New translation batch for ja (#30736)
This commit is contained in:
@@ -41,10 +41,10 @@ children:
|
||||
- /setting-up-and-managing-your-github-profile
|
||||
- /managing-subscriptions-and-notifications-on-github
|
||||
ms.openlocfilehash: 922990e3a89a53f625e739650c3c3b329f1f497d
|
||||
ms.sourcegitcommit: fb047f9450b41b24afc43d9512a5db2a2b750a2a
|
||||
ms.sourcegitcommit: 770ed406ec075528ec9c9695aa4bfdc8c8b25fd3
|
||||
ms.translationtype: HT
|
||||
ms.contentlocale: ja-JP
|
||||
ms.lasthandoff: 09/10/2022
|
||||
ms.locfileid: '146200195'
|
||||
ms.lasthandoff: 09/12/2022
|
||||
ms.locfileid: '147888461'
|
||||
---
|
||||
|
||||
|
||||
@@ -21,10 +21,10 @@ children:
|
||||
- /troubleshooting-commits-on-your-timeline
|
||||
shortTitle: Manage contribution settings
|
||||
ms.openlocfilehash: 022a9afdb91a5c65cea12c4bbeef5c4ba9673be6
|
||||
ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5
|
||||
ms.sourcegitcommit: fb047f9450b41b24afc43d9512a5db2a2b750a2a
|
||||
ms.translationtype: HT
|
||||
ms.contentlocale: ja-JP
|
||||
ms.lasthandoff: 09/05/2022
|
||||
ms.locfileid: '147079927'
|
||||
ms.lasthandoff: 09/11/2022
|
||||
ms.locfileid: '147881212'
|
||||
---
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
title: ユーザ アカウント設定の管理
|
||||
intro: ユーザ名を変更する、アカウントを削除するなど、個人アカウントの設定を変更できます。
|
||||
intro: テーマ、ユーザー名、既定のブランチ、アクセシビリティ、セキュリティ設定など、個人用アカウントの設定を管理できます。
|
||||
redirect_from:
|
||||
- /categories/29/articles
|
||||
- /categories/user-accounts
|
||||
@@ -29,11 +29,11 @@ children:
|
||||
- /integrating-jira-with-your-personal-projects
|
||||
- /what-does-the-available-for-hire-checkbox-do
|
||||
shortTitle: Personal account settings
|
||||
ms.openlocfilehash: 4ec9ec2df1f75c30a0fe9827adcdd6694043d6b1
|
||||
ms.sourcegitcommit: dc42bb4a4826b414751ffa9eed38962c3e3fea8e
|
||||
ms.openlocfilehash: fcb653fa2fd40c206deefdaf967bae6104393537
|
||||
ms.sourcegitcommit: 478f2931167988096ae6478a257f492ecaa11794
|
||||
ms.translationtype: HT
|
||||
ms.contentlocale: ja-JP
|
||||
ms.lasthandoff: 07/13/2022
|
||||
ms.locfileid: '145165246'
|
||||
ms.lasthandoff: 09/09/2022
|
||||
ms.locfileid: '147760864'
|
||||
---
|
||||
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
---
|
||||
title: GitHub のエンタープライズ マーケティング ページの Cookie 基本設定の管理
|
||||
intro: 'エンタープライズ マーケティング ページに対する重要でない追跡 Cookie からの情報を {% data variables.product.company_short %} でどのように使用するかを制御できます。'
|
||||
versions:
|
||||
fpt: '*'
|
||||
ghes: '*'
|
||||
ghae: '*'
|
||||
ghec: '*'
|
||||
topics:
|
||||
- Accounts
|
||||
shortTitle: Manage cookie preferences
|
||||
ms.openlocfilehash: f2fdbcf8bd552902e7db491aa1b3c6622c5673ab
|
||||
ms.sourcegitcommit: 478f2931167988096ae6478a257f492ecaa11794
|
||||
ms.translationtype: HT
|
||||
ms.contentlocale: ja-JP
|
||||
ms.lasthandoff: 09/09/2022
|
||||
ms.locfileid: '147760923'
|
||||
---
|
||||
## エンタープライズ マーケティング ページでの Cookie の基本設定について
|
||||
|
||||
{% data variables.product.company_short %} では、一部のエンタープライズ マーケティング ページで重要でない Cookie を使用する場合があります。 これらの Cookie の動作はカスタマイズできます。 {% data variables.product.company_short %} で Cookie を使用する方法について詳しくは、「[{% data variables.product.company_short %} のプライバシーに関する声明](/free-pro-team@latest/site-policy/privacy-policies/github-privacy-statement)」を参照してください。
|
||||
|
||||
## Cookie の基本設定を変更する
|
||||
|
||||
{% data variables.product.company_short %} エンタープライズ マーケティング ページでの重要でない Cookie の動作はカスタマイズできます。
|
||||
|
||||
1. Cookie の基本設定を変更する {% data variables.product.company_short %} エンタープライズ マーケティング ページに移動します。 たとえば、[{% data variables.product.company_short %} リソースに移動します](https://resources.github.com/)。
|
||||
1. ページの下までスクロールして、 **[Cookie の管理]** をクリックします。
|
||||
|
||||

|
||||
|
||||
1. [Cookie の基本設定の管理] で、重要でない各 Cookie を受け入れまたは拒否するには、 **[承諾]** または **[拒否]** をクリックします。
|
||||
|
||||
![重要でない Cookie について [承諾] または [拒否] を選ぶためのラジオ ボタンのスクリーンショット。](/assets/images/help/settings/cookie-settings-accept-or-reject.png)
|
||||
|
||||
1. **[変更を保存]** をクリックします。
|
||||
|
||||

|
||||
@@ -15,10 +15,10 @@ topics:
|
||||
- Accounts
|
||||
shortTitle: Project board permissions
|
||||
ms.openlocfilehash: 353b9ac497abc7110437aafdf691ca48a3ff6cec
|
||||
ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5
|
||||
ms.sourcegitcommit: 80842b4e4c500daa051eff0ccd7cde91c2d4bb36
|
||||
ms.translationtype: HT
|
||||
ms.contentlocale: ja-JP
|
||||
ms.lasthandoff: 09/05/2022
|
||||
ms.lasthandoff: 09/12/2022
|
||||
ms.locfileid: '145165343'
|
||||
---
|
||||
## アクセス許可の概要
|
||||
|
||||
@@ -16,11 +16,11 @@ topics:
|
||||
- Accounts
|
||||
shortTitle: Show or hide membership
|
||||
ms.openlocfilehash: 89f9c7ee5cae6215412fd20dc0590f4f8dc5bf0b
|
||||
ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5
|
||||
ms.sourcegitcommit: fb047f9450b41b24afc43d9512a5db2a2b750a2a
|
||||
ms.translationtype: HT
|
||||
ms.contentlocale: ja-JP
|
||||
ms.lasthandoff: 09/05/2022
|
||||
ms.locfileid: '145164893'
|
||||
ms.lasthandoff: 09/11/2022
|
||||
ms.locfileid: '147881180'
|
||||
---
|
||||
![[Profile organizations] ボックス](/assets/images/help/profile/profile_orgs_box.png)
|
||||
|
||||
|
||||
@@ -17,10 +17,10 @@ topics:
|
||||
- Accounts
|
||||
shortTitle: View people in an organization
|
||||
ms.openlocfilehash: e0632ffeb394615b7b64ad55673b69fc738bca27
|
||||
ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5
|
||||
ms.sourcegitcommit: 80842b4e4c500daa051eff0ccd7cde91c2d4bb36
|
||||
ms.translationtype: HT
|
||||
ms.contentlocale: ja-JP
|
||||
ms.lasthandoff: 09/05/2022
|
||||
ms.lasthandoff: 09/12/2022
|
||||
ms.locfileid: '146179632'
|
||||
---
|
||||
## 組織のロールを表示する
|
||||
|
||||
@@ -11,10 +11,10 @@ topics:
|
||||
- CI
|
||||
shortTitle: Build & test Go
|
||||
ms.openlocfilehash: 64e0c8acfa23436903b510a47cd1b43f55274f5f
|
||||
ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5
|
||||
ms.sourcegitcommit: 80842b4e4c500daa051eff0ccd7cde91c2d4bb36
|
||||
ms.translationtype: HT
|
||||
ms.contentlocale: ja-JP
|
||||
ms.lasthandoff: 09/05/2022
|
||||
ms.lasthandoff: 09/12/2022
|
||||
ms.locfileid: '147080065'
|
||||
---
|
||||
{% data reusables.actions.enterprise-beta %} {% data reusables.actions.enterprise-github-hosted-runners %}
|
||||
|
||||
@@ -11,11 +11,11 @@ versions:
|
||||
type: how_to
|
||||
shortTitle: Publish in GitHub Marketplace
|
||||
ms.openlocfilehash: e16f65116d7aa7c327e937dc2eba8964195e547d
|
||||
ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5
|
||||
ms.sourcegitcommit: 5f9527483381cfb1e41f2322f67c80554750a47d
|
||||
ms.translationtype: HT
|
||||
ms.contentlocale: ja-JP
|
||||
ms.lasthandoff: 09/05/2022
|
||||
ms.locfileid: '147643902'
|
||||
ms.lasthandoff: 09/11/2022
|
||||
ms.locfileid: '147884302'
|
||||
---
|
||||
{% data variables.product.prodname_marketplace %}でアクションを公開するには、利用規約に同意していなければなりません。
|
||||
|
||||
|
||||
@@ -16,11 +16,11 @@ topics:
|
||||
- Amazon ECS
|
||||
shortTitle: Deploy to Amazon ECS
|
||||
ms.openlocfilehash: 259a3fd5bc0076f60d0c08f356b3ec9914effe89
|
||||
ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5
|
||||
ms.sourcegitcommit: fcf3546b7cc208155fb8acdf68b81be28afc3d2d
|
||||
ms.translationtype: HT
|
||||
ms.contentlocale: ja-JP
|
||||
ms.lasthandoff: 09/05/2022
|
||||
ms.locfileid: '147410188'
|
||||
ms.lasthandoff: 09/11/2022
|
||||
ms.locfileid: '147881107'
|
||||
---
|
||||
{% data reusables.actions.enterprise-beta %} {% data reusables.actions.enterprise-github-hosted-runners %}
|
||||
|
||||
|
||||
@@ -15,10 +15,10 @@ children:
|
||||
- /managing-your-deployments
|
||||
- /deploying-xcode-applications
|
||||
ms.openlocfilehash: f12dbb4711f43efa6e8a25f0ad274f686d62c654
|
||||
ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5
|
||||
ms.sourcegitcommit: 80842b4e4c500daa051eff0ccd7cde91c2d4bb36
|
||||
ms.translationtype: HT
|
||||
ms.contentlocale: ja-JP
|
||||
ms.lasthandoff: 09/05/2022
|
||||
ms.lasthandoff: 09/12/2022
|
||||
ms.locfileid: '145088591'
|
||||
---
|
||||
|
||||
|
||||
@@ -10,10 +10,10 @@ versions:
|
||||
children:
|
||||
- /viewing-deployment-history
|
||||
ms.openlocfilehash: 3dcd623a837b70d3f6ca5bd4d143697ee8475b70
|
||||
ms.sourcegitcommit: 5f9527483381cfb1e41f2322f67c80554750a47d
|
||||
ms.sourcegitcommit: 76b840f45ba85fb79a7f0c1eb43bc663b3eadf2b
|
||||
ms.translationtype: HT
|
||||
ms.contentlocale: ja-JP
|
||||
ms.lasthandoff: 09/11/2022
|
||||
ms.lasthandoff: 09/12/2022
|
||||
ms.locfileid: '145068729'
|
||||
---
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
---
|
||||
title: About security hardening with OpenID Connect
|
||||
title: OpenID Connect を使ったセキュリティ強化について
|
||||
shortTitle: About security hardening with OpenID Connect
|
||||
intro: OpenID Connect allows your workflows to exchange short-lived tokens directly from your cloud provider.
|
||||
intro: OpenID Connect を使用すると、ワークフローによって、有効期間の短いトークンをクラウド プロバイダーから直接交換できます。
|
||||
miniTocMaxHeadingLevel: 4
|
||||
versions:
|
||||
fpt: '*'
|
||||
@@ -11,50 +11,54 @@ versions:
|
||||
type: tutorial
|
||||
topics:
|
||||
- Security
|
||||
ms.openlocfilehash: 23c541fa3c99b706877fc29c52174c404d5fca3d
|
||||
ms.sourcegitcommit: 478f2931167988096ae6478a257f492ecaa11794
|
||||
ms.translationtype: HT
|
||||
ms.contentlocale: ja-JP
|
||||
ms.lasthandoff: 09/09/2022
|
||||
ms.locfileid: '147710268'
|
||||
---
|
||||
{% data reusables.actions.enterprise-beta %} {% data reusables.actions.enterprise-github-hosted-runners %}
|
||||
|
||||
{% data reusables.actions.enterprise-beta %}
|
||||
{% data reusables.actions.enterprise-github-hosted-runners %}
|
||||
## OpenID Connect の概要
|
||||
|
||||
## Overview of OpenID Connect
|
||||
多くの場合、{% data variables.product.prodname_actions %} ワークフローは、ソフトウェアをデプロイするため、またはクラウドのサービスを使うために、クラウド プロバイダー (AWS、Azure、GCP、HashiCorp Vault など) にアクセスするように設計されています。 ワークフローは、このようなリソースにアクセスできるように、パスワードやトークンなどの資格情報をクラウド プロバイダーに事前に提供します。 通常、このような資格情報は {% data variables.product.prodname_dotcom %} にシークレットとして格納されており、ワークフローは、実行時に毎回このシークレットをクラウド プロバイダーに提示します。
|
||||
|
||||
{% data variables.product.prodname_actions %} workflows are often designed to access a cloud provider (such as AWS, Azure, GCP, or HashiCorp Vault) in order to deploy software or use the cloud's services. Before the workflow can access these resources, it will supply credentials, such as a password or token, to the cloud provider. These credentials are usually stored as a secret in {% data variables.product.prodname_dotcom %}, and the workflow presents this secret to the cloud provider every time it runs.
|
||||
ただし、ハードコーディングされたシークレットを使うには、クラウド プロバイダーで資格情報を作成し、それをシークレットとして {% data variables.product.prodname_dotcom %} に複製する必要があります。
|
||||
|
||||
However, using hardcoded secrets requires you to create credentials in the cloud provider and then duplicate them in {% data variables.product.prodname_dotcom %} as a secret.
|
||||
OpenID Connect (OIDC) を使って、有効期間が短いアクセス トークンをクラウド プロバイダーに直接要求するようにワークフローを構成するという別の方法を採ることもできます。 クラウド プロバイダー側でも OIDC をサポートする必要がある場合は、アクセス トークンを要求できるワークフローを制御する信頼関係を構成する必要があります。 現在 OIDC をサポートしているプロバイダーとして、アマゾン ウェブ サービス、Azure、Google Cloud Platform、HashiCorp Vault などがあります。
|
||||
|
||||
With OpenID Connect (OIDC), you can take a different approach by configuring your workflow to request a short-lived access token directly from the cloud provider. Your cloud provider also needs to support OIDC on their end, and you must configure a trust relationship that controls which workflows are able to request the access tokens. Providers that currently support OIDC include Amazon Web Services, Azure, Google Cloud Platform, and HashiCorp Vault, among others.
|
||||
### OIDC を使う利点
|
||||
|
||||
### Benefits of using OIDC
|
||||
OIDC トークンを使うようにワークフローを更新することで、次のような優れたセキュリティ プラクティスを採用できます。
|
||||
|
||||
By updating your workflows to use OIDC tokens, you can adopt the following good security practices:
|
||||
- **クラウド シークレットなし**: 有効期間が長い {% data variables.product.prodname_dotcom %} シークレットとしてクラウドの資格情報を複製する必要はありません。 代わりに、クラウド プロバイダー上で OIDC 信頼を構成し、OIDC を介して有効期間が短いアクセス トークンをクラウド プロバイダーに要求するようにワークフローを更新することができます。
|
||||
- **認証と認可の管理**: クラウド プロバイダーの認証 (authN) および認可 (authZ) ツールを使ってクラウド リソースへのアクセスを制御することで、ワークフローから資格情報を使用する方法をより細かく制御できます。
|
||||
- **資格情報のローテーション**: OIDC を使う場合、1 つのジョブに対してのみ有効であり、自動的に失効する有効期間が短いアクセス トークンがクラウド プロバイダーから発行されます。
|
||||
|
||||
- **No cloud secrets**: You won't need to duplicate your cloud credentials as long-lived {% data variables.product.prodname_dotcom %} secrets. Instead, you can configure the OIDC trust on your cloud provider, and then update your workflows to request a short-lived access token from the cloud provider through OIDC.
|
||||
- **Authentication and authorization management**: You have more granular control over how workflows can use credentials, using your cloud provider's authentication (authN) and authorization (authZ) tools to control access to cloud resources.
|
||||
- **Rotating credentials**: With OIDC, your cloud provider issues a short-lived access token that is only valid for a single job, and then automatically expires.
|
||||
### OIDC の概要
|
||||
|
||||
### Getting started with OIDC
|
||||
次の図は、{% data variables.product.prodname_dotcom %} の OIDC プロバイダーがワークフローやクラウド プロバイダーとどのように統合されているかを示す概要です。
|
||||
|
||||
The following diagram gives an overview of how {% data variables.product.prodname_dotcom %}'s OIDC provider integrates with your workflows and cloud provider:
|
||||

|
||||
|
||||

|
||||
1. クラウド プロバイダー内に、クラウド ロールと、クラウドへのアクセスを必要とする {% data variables.product.prodname_dotcom %} ワークフローとの間に OIDC 信頼を作成します。
|
||||
2. ジョブを実行するたびに、{% data variables.product.prodname_dotcom %} の OIDC プロバイダーによって OIDC トークンが自動生成されます。 このトークンには、認証対象の特定のワークフローに関する、セキュリティが強化された検証可能な ID を確立するための複数の要求が含まれています。
|
||||
3. このトークンを {% data variables.product.prodname_dotcom %} の OIDC プロバイダーに要求し、クラウド プロバイダーに提示するステップまたはアクションをジョブ内に含めることができます。
|
||||
4. クラウド プロバイダーは、トークンで提示した要求の検証を完了した後に、ジョブの期間中にのみ使用できる有効期間の短いクラウド アクセス トークンを提供します。
|
||||
|
||||
1. In your cloud provider, create an OIDC trust between your cloud role and your {% data variables.product.prodname_dotcom %} workflow(s) that need access to the cloud.
|
||||
2. Every time your job runs, {% data variables.product.prodname_dotcom %}'s OIDC Provider auto-generates an OIDC token. This token contains multiple claims to establish a security-hardened and verifiable identity about the specific workflow that is trying to authenticate.
|
||||
3. You could include a step or action in your job to request this token from {% data variables.product.prodname_dotcom %}'s OIDC provider, and present it to the cloud provider.
|
||||
4. Once the cloud provider successfully validates the claims presented in the token, it then provides a short-lived cloud access token that is available only for the duration of the job.
|
||||
## クラウドを使った OIDC 信頼の構成
|
||||
|
||||
## Configuring the OIDC trust with the cloud
|
||||
{% data variables.product.prodname_dotcom %} の OIDC プロバイダーを信頼するようにクラウドを構成する場合は、受信する要求をフィルター処理する条件を追加する **必要があります**。これは、信頼できないリポジトリやワークフローがクラウド リソースに対してアクセス トークンを要求できないようにするためです。
|
||||
|
||||
When you configure your cloud to trust {% data variables.product.prodname_dotcom %}'s OIDC provider, you **must** add conditions that filter incoming requests, so that untrusted repositories or workflows can’t request access tokens for your cloud resources:
|
||||
|
||||
- Before granting an access token, your cloud provider checks that the [`subject`](https://openid.net/specs/openid-connect-core-1_0.html#StandardClaims) and other claims used to set conditions in its trust settings match those in the request's JSON Web Token (JWT). As a result, you must take care to correctly define the _subject_ and other conditions in your cloud provider.
|
||||
- The OIDC trust configuration steps and the syntax to set conditions for cloud roles (using _Subject_ and other claims) will vary depending on which cloud provider you're using. For some examples, see "[Example subject claims](#example-subject-claims)."
|
||||
- クラウド プロバイダーは、アクセス トークンを付与する前に、信頼設定で条件を設定するために使われた [`subject`](https://openid.net/specs/openid-connect-core-1_0.html#StandardClaims) と他の要求が、要求の JSON Web トークン (JWT) 内のものと一致するかどうかを確認します。 そのため、クラウド プロバイダーで _subject_ や他の条件を正しく定義するように注意する必要があります。
|
||||
- OIDC 信頼の構成手順と、(_Subject_ やその他の要求を使って) クラウド ロールの条件を設定する構文は、利用しているクラウド プロバイダーによって異なります。 例については、「[サブジェクト要求の例](#example-subject-claims)」を参照してください。
|
||||
|
||||
### Understanding the OIDC token
|
||||
### OIDC トークンの概要
|
||||
|
||||
Each job requests an OIDC token from {% data variables.product.prodname_dotcom %}'s OIDC provider, which responds with an automatically generated JSON web token (JWT) that is unique for each workflow job where it is generated. When the job runs, the OIDC token is presented to the cloud provider. To validate the token, the cloud provider checks if the OIDC token's subject and other claims are a match for the conditions that were preconfigured on the cloud role's OIDC trust definition.
|
||||
各ジョブは {% data variables.product.prodname_dotcom %} の OIDC プロバイダーに OIDC トークンを要求し、その応答として、自動的に生成された JSON Web トークン (JWT) が返されます。これは生成されたワークフロー ジョブごとに一意です。 このジョブを実行すると、OIDC トークンがクラウド プロバイダーに提示されます。 クラウド プロバイダーは、トークンを検証するために、OIDC トークンの subject とその他の要求がクラウド ロールの OIDC 信頼定義に事前に構成されている条件と一致するかどうかを確認します。
|
||||
|
||||
The following example OIDC token uses a subject (`sub`) that references a job environment named `prod` in the `octo-org/octo-repo` repository.
|
||||
次の OIDC トークン例では、`octo-org/octo-repo` リポジトリ内の `prod` というジョブ環境を参照する subject (`sub`) を使っています。
|
||||
|
||||
```yaml
|
||||
{
|
||||
@@ -93,177 +97,176 @@ The following example OIDC token uses a subject (`sub`) that references a job en
|
||||
}
|
||||
```
|
||||
|
||||
To see all the claims supported by {% data variables.product.prodname_dotcom %}'s OIDC provider, review the `claims_supported` entries at
|
||||
{% ifversion ghes %}`https://HOSTNAME/_services/token/.well-known/openid-configuration`{% else %}https://token.actions.githubusercontent.com/.well-known/openid-configuration{% endif %}.
|
||||
{% data variables.product.prodname_dotcom %} の OIDC プロバイダーがサポートするすべての要求を確認するには、{% ifversion ghes %}`https://HOSTNAME/_services/token/.well-known/openid-configuration`{% else %} https://token.actions.githubusercontent.com/.well-known/openid-configuration{% endif %} の `claims_supported` のエントリを確認します。
|
||||
|
||||
The token includes the standard audience, issuer, and subject claims:
|
||||
このトークンには、標準の audience、issuer、subject 要求が含まれています。
|
||||
|
||||
| Claim | Description |
|
||||
| 要求 | 説明 |
|
||||
| ----------- | ---------------------- |
|
||||
| `aud`| _(Audience)_ By default, this is the URL of the repository owner, such as the organization that owns the repository. This is the only claim that can be customized. You can set a custom audience with a toolkit command: [`core.getIDToken(audience)`](https://www.npmjs.com/package/@actions/core/v/1.6.0) |
|
||||
| `iss`| _(Issuer)_ The issuer of the OIDC token: {% ifversion ghes %}`https://HOSTNAME/_services/token`{% else %}`https://token.actions.githubusercontent.com`{% endif %} |
|
||||
| `sub`| _(Subject)_ Defines the subject claim that is to be validated by the cloud provider. This setting is essential for making sure that access tokens are only allocated in a predictable way.|
|
||||
| `aud`| _(Audience)_ 既定では、これはリポジトリ所有者 (リポジトリを所有する組織など) の URL です。 カスタマイズできるのは、この要求のみです。 ツールキットのコマンド ([`core.getIDToken(audience)`](https://www.npmjs.com/package/@actions/core/v/1.6.0)) を使ってカスタムの対象ユーザーを設定できます |
|
||||
| `iss`| _(Issuer)_ 。OIDC トークンの発行者: {% ifversion ghes %}`https://HOSTNAME/_services/token`{% else %}`https://token.actions.githubusercontent.com`{% endif %} |
|
||||
| `sub`| _(Subject)_ クラウド プロバイダーによって検証される subject 要求を定義します。 常に予測可能な方法でアクセス トークンを割り当てるには、この設定が不可欠です。|
|
||||
|
||||
The OIDC token also includes additional standard claims:
|
||||
OIDC トークンには、標準の要求が他にもあります。
|
||||
|
||||
| Claim | Description |
|
||||
| 要求 | 説明 |
|
||||
| ----------- | ---------------------- |
|
||||
| `alg`| _(Algorithm)_ The algorithm used by the OIDC provider. |
|
||||
| `exp`| _(Expires at)_ Identifies the expiry time of the JWT. |
|
||||
| `iat`| _(Issued at)_ The time when the JWT was issued. |
|
||||
| `jti`| _(JWT token identifier)_ Unique identifier for the OIDC token. |
|
||||
| `kid`| _(Key identifier)_ Unique key for the OIDC token. |
|
||||
| `nbf`| _(Not before)_ JWT is not valid for use before this time. |
|
||||
| `typ`| _(Type)_ Describes the type of token. This is a JSON Web Token (JWT). |
|
||||
| `alg`| _(Algorithm)_ OIDC プロバイダーが使うアルゴリズム。 |
|
||||
| `exp`| _(Expires at)_ JWT の有効期限を特定します。 |
|
||||
| `iat`| _(Issued at)_ JWT が発行された時刻。 |
|
||||
| `jti`| _(JWT token identifier)_ OIDC トークンの一意の識別子。 |
|
||||
| `kid`| _(Key identifier)_ OIDC トークンの一意のキー。 |
|
||||
| `nbf`| _(Not before)_ この時刻より前に JWT を使用することはできません。 |
|
||||
| `typ`| _(Type)_ トークンの種類について説明します。 これは JSON Web トークン (JWT) です。 |
|
||||
|
||||
The token also includes custom claims provided by {% data variables.product.prodname_dotcom %}:
|
||||
トークンには、{% data variables.product.prodname_dotcom %} が提供するカスタム要求も含まれています。
|
||||
|
||||
| Claim | Description |
|
||||
| 要求 | 説明 |
|
||||
| ----------- | ---------------------- |
|
||||
| `actor`| The personal account that initiated the workflow run. |
|
||||
| `actor_id`| The ID of personal account that initiated the workflow run. |
|
||||
| `base_ref`| The target branch of the pull request in a workflow run. |
|
||||
| `environment`| The name of the environment used by the job. |
|
||||
| `event_name`| The name of the event that triggered the workflow run. |
|
||||
| `head_ref`| The source branch of the pull request in a workflow run. |
|
||||
| `job_workflow_ref`| This is the ref path to the reusable workflow used by this job. For more information, see "["Using OpenID Connect with reusable workflows"](/actions/deployment/security-hardening-your-deployments/using-openid-connect-with-reusable-workflows)." |
|
||||
| `ref`| _(Reference)_ The git ref that triggered the workflow run. |
|
||||
| `ref_type`| The type of `ref`, for example: "branch". |
|
||||
| `repo_visibility` | The visibility of the repository where the workflow is running. Accepts the following values: `internal`, `private`, or `public`. |
|
||||
| `repository`| The repository from where the workflow is running. |
|
||||
| `repository_id`| The ID of the repository from where the workflow is running. |
|
||||
| `repository_owner`| The name of the organization in which the `repository` is stored. |
|
||||
| `repository_owner_id`| The ID of the organization in which the `repository` is stored. |
|
||||
| `run_id`| The ID of the workflow run that triggered the workflow. |
|
||||
| `run_number`| The number of times this workflow has been run. |
|
||||
| `run_attempt`| The number of times this workflow run has been retried. |
|
||||
| `workflow`| The name of the workflow. |
|
||||
| `actor`| ワークフロー実行を開始した個人アカウント。 |
|
||||
| `actor_id`| ワークフロー実行を開始した個人アカウントの ID。 |
|
||||
| `base_ref`| ワークフロー実行における pull request のターゲット ブランチ。 |
|
||||
| `environment`| ジョブが使う環境の名前。 |
|
||||
| `event_name`| ワークフローの実行をトリガーしたイベントの名前。 |
|
||||
| `head_ref`| ワークフロー実行における pull request のソース ブランチ。 |
|
||||
| `job_workflow_ref`| これは、このジョブが使う再利用可能なワークフローの参照パスです。 詳細については、「[再利用可能なワークフローでの OpenID Connect の使用](/actions/deployment/security-hardening-your-deployments/using-openid-connect-with-reusable-workflows)」を参照してください。 |
|
||||
| `ref`| _(Reference)_ ワークフロー実行をトリガーした git ref。 |
|
||||
| `ref_type`| `ref` の種類。例: "branch"。 |
|
||||
| `repo_visibility` | ワークフローが実行されているリポジトリの可視性。 次の値を受け入れます: `internal`、`private`、または `public`。 |
|
||||
| `repository`| ワークフローが実行されているリポジトリ。 |
|
||||
| `repository_id`| ワークフローが実行されているリポジトリの ID。 |
|
||||
| `repository_owner`| `repository` が格納されている組織の名前。 |
|
||||
| `repository_owner_id`| `repository` が格納されている組織の ID。 |
|
||||
| `run_id`| ワークフローをトリガーしたワークフロー実行の ID。 |
|
||||
| `run_number`| このワークフローが実行された回数。 |
|
||||
| `run_attempt`| このワークフロー実行が再試行された回数。 |
|
||||
| `workflow`| ワークフローの名前。 |
|
||||
|
||||
### Defining trust conditions on cloud roles using OIDC claims
|
||||
### OIDC 要求を使ったクラウド ロールに対する信頼条件の定義
|
||||
|
||||
With OIDC, a {% data variables.product.prodname_actions %} workflow requires a token in order to access resources in your cloud provider. The workflow requests an access token from your cloud provider, which checks the details presented by the JWT. If the trust configuration in the JWT is a match, your cloud provider responds by issuing a temporary token to the workflow, which can then be used to access resources in your cloud provider. You can configure your cloud provider to only respond to requests that originate from a specific organization's repository; you can also specify additional conditions, described below.
|
||||
OIDC を使う場合、クラウド プロバイダー内のリソースにアクセスするには、{% data variables.product.prodname_actions %} ワークフローにトークンが必要です。 ワークフローはクラウド プロバイダーにアクセス トークンを要求します。そこで、JWT から提示された詳細が確認されます。 JWT の信頼構成が一致した場合、クラウド プロバイダーは、応答として一時的なトークンをワークフローに発行します。これを使って、クラウド プロバイダー内のリソースにアクセスできるようになります。 特定の組織のリポジトリから送信された要求のみに応答するようにクラウド プロバイダーを構成することができます。また、後述する追加の条件を指定することもできます。
|
||||
|
||||
Audience and Subject claims are typically used in combination while setting conditions on the cloud role/resources to scope its access to the GitHub workflows.
|
||||
- **Audience**: By default, this value uses the URL of the organization or repository owner. This can be used to set a condition that only the workflows in the specific organization can access the cloud role.
|
||||
- **Subject**: By default, has a predefined format and is a concatenation of some of the key metadata about the workflow, such as the {% data variables.product.prodname_dotcom %} organization, repository, branch, or associated [`job`](/actions/learn-github-actions/workflow-syntax-for-github-actions#jobsjob_idenvironment) environment. See "[Example subject claims](#example-subject-claims)" to see how the subject claim is assembled from concatenated metadata.
|
||||
通常、Audience と Subject の要求は、GitHub ワークフローへのアクセスにスコープを設定する目的で、クラウド ロールやリソースに対する条件の設定時に組み合わせて使います。
|
||||
- **Audience**: 既定では、この値には組織またはリポジトリ所有者の URL を使います。 これを使って、特定の組織内のワークフローのみがクラウド ロールにアクセスできるように条件を設定できます。
|
||||
- **Subject**: 既定では、事前に定義された書式があります。{% data variables.product.prodname_dotcom %} の Organization、リポジトリ、ブランチ、関連付けられた [`job`](/actions/learn-github-actions/workflow-syntax-for-github-actions#jobsjob_idenvironment) 環境など、ワークフローに関する主要なメタデータの一部を連結したものです。 連結したメタデータからサブジェクト要求を組み立てる方法については、「[サブジェクト要求の例](#example-subject-claims)」を参照してください。
|
||||
|
||||
If you need more granular trust conditions, you can customize the issuer (`iss`) and subject (`sub`) claims that are included with the JWT. For more information, see "[Customizing the token claims](#customizing-the-token-claims)".
|
||||
より詳しい信頼条件が必要な場合は、JWT に含まれる issuer (`iss`) と subject (`sub`) の要求をカスタマイズできます。 詳しくは、「[トークン クレームのカスタマイズ](#customizing-the-token-claims)」を参照してください。
|
||||
|
||||
There are also many additional claims supported in the OIDC token that can be used for setting these conditions. In addition, your cloud provider could allow you to assign a role to the access tokens, letting you specify even more granular permissions.
|
||||
また、OIDC トークンでサポートされている要求は他にも多数あり、これらの条件設定にも使用できます。 さらに、クラウド プロバイダーがアクセス トークンへのロール割り当てを許可していて、さらに細かいアクセス許可を指定できる場合があります。
|
||||
|
||||
{% note %}
|
||||
|
||||
**Note**: To control how your cloud provider issues access tokens, you **must** define at least one condition, so that untrusted repositories can’t request access tokens for your cloud resources.
|
||||
**注**: クラウド プロバイダーがアクセス トークンを発行する方法を制御するには、少なくとも 1 つの条件を定義し、信頼できないリポジトリがクラウド リソースにアクセス トークンを要求できないようにする **必要があります**。
|
||||
|
||||
{% endnote %}
|
||||
|
||||
### Example subject claims
|
||||
### subject 要求の例
|
||||
|
||||
The following examples demonstrate how to use "Subject" as a condition, and explain how the "Subject" is assembled from concatenated metadata. The [subject](https://openid.net/specs/openid-connect-core-1_0.html#StandardClaims) uses information from the [`job` context](/actions/learn-github-actions/contexts#job-context), and instructs your cloud provider that access token requests may only be granted for requests from workflows running in specific branches, environments. The following sections describe some common subjects you can use.
|
||||
次の例は、"Subject" を条件として使う方法を示しています。また、連結したメタデータから "Subject" を組み立てる方法について説明します。 [subject](https://openid.net/specs/openid-connect-core-1_0.html#StandardClaims) は [`job` コンテキスト](/actions/learn-github-actions/contexts#job-context)の情報を使い、特定のブランチ、環境内で動作するワークフローからの要求に対してのみアクセス トークン要求を許可するようにクラウド プロバイダーに指示します。 以下のセクションでは、使用できる一般的な subject について説明します。
|
||||
|
||||
#### Filtering for a specific environment
|
||||
#### 特定の環境にフィルター処理する
|
||||
|
||||
The subject claim includes the environment name when the job references an environment.
|
||||
ジョブから環境を参照するときに、subject 要求には環境名が含まれます。
|
||||
|
||||
You can configure a subject that filters for a specific [environment](/actions/deployment/using-environments-for-deployment) name. In this example, the workflow run must have originated from a job that has an environment named `Production`, in a repository named `octo-repo` that is owned by the `octo-org` organization:
|
||||
特定の[環境](/actions/deployment/using-environments-for-deployment)名にフィルター処理する subject を構成することができます。 この例で、ワークフロー実行は、`octo-org` 組織が所有する `octo-repo` というリポジトリ内にある `Production` という環境を持つジョブから開始されている必要があります。
|
||||
|
||||
| | |
|
||||
| ------ | ----------- |
|
||||
| Syntax: | `repo:<orgName/repoName>:environment:<environmentName>` |
|
||||
| Example:| `repo:octo-org/octo-repo:environment:Production` |
|
||||
| 構文: | `repo:<orgName/repoName>:environment:<environmentName>` |
|
||||
| 例:| `repo:octo-org/octo-repo:environment:Production` |
|
||||
|
||||
#### Filtering for `pull_request` events
|
||||
#### `pull_request` イベントにフィルター処理する
|
||||
|
||||
The subject claim includes the `pull_request` string when the workflow is triggered by a pull request event, but only if the job doesn't reference an environment.
|
||||
pull request イベントによってワークフローがトリガーされたとき、ジョブが環境を参照していない場合に限り、subject 要求には `pull_request` 文字列が含まれます。
|
||||
|
||||
You can configure a subject that filters for the [`pull_request`](/actions/learn-github-actions/events-that-trigger-workflows#pull_request) event. In this example, the workflow run must have been triggered by a `pull_request` event in a repository named `octo-repo` that is owned by the `octo-org` organization:
|
||||
[`pull_request`](/actions/learn-github-actions/events-that-trigger-workflows#pull_request) イベントにフィルター処理する subject を構成することができます。 この例で、ワークフロー実行は、`octo-org` 組織が所有する `octo-repo` というリポジトリ内の `pull_request` イベントによってトリガーされている必要があります。
|
||||
|
||||
| | |
|
||||
| ------ | ----------- |
|
||||
| Syntax: | `repo:<orgName/repoName>:pull_request` |
|
||||
| Example:| `repo:octo-org/octo-repo:pull_request` |
|
||||
| 構文: | `repo:<orgName/repoName>:pull_request` |
|
||||
| 例:| `repo:octo-org/octo-repo:pull_request` |
|
||||
|
||||
#### Filtering for a specific branch
|
||||
#### 特定のブランチにフィルター処理する
|
||||
|
||||
The subject claim includes the branch name of the workflow, but only if the job doesn't reference an environment, and if the workflow is not triggered by a pull request event.
|
||||
ジョブから環境を参照していない場合、かつ pull request イベントによってトリガーされたワークフローではない場合にのみ、subject 要求にはワークフローのブランチ名が含まれます。
|
||||
|
||||
You can configure a subject that filters for a specific branch name. In this example, the workflow run must have originated from a branch named `demo-branch`, in a repository named `octo-repo` that is owned by the `octo-org` organization:
|
||||
特定のブランチ名にフィルター処理する subject を構成することができます。 この例で、ワークフロー実行は、`octo-org` 組織が所有する `octo-repo` というリポジトリ内にある `demo-branch` というブランチから開始されている必要があります。
|
||||
|
||||
| | |
|
||||
| ------ | ----------- |
|
||||
| Syntax: | `repo:<orgName/repoName>:ref:refs/heads/branchName` |
|
||||
| Example:| `repo:octo-org/octo-repo:ref:refs/heads/demo-branch` |
|
||||
| 構文: | `repo:<orgName/repoName>:ref:refs/heads/branchName` |
|
||||
| 例:| `repo:octo-org/octo-repo:ref:refs/heads/demo-branch` |
|
||||
|
||||
#### Filtering for a specific tag
|
||||
#### 特定のタグにフィルター処理する
|
||||
|
||||
The subject claim includes the tag name of the workflow, but only if the job doesn't reference an environment, and if the workflow is not triggered by a pull request event.
|
||||
ジョブから環境を参照していない場合、かつ pull request イベントによってトリガーされたワークフローではない場合にのみ、subject 要求にはワークフローのタグ名が含まれます。
|
||||
|
||||
You can create a subject that filters for specific tag. In this example, the workflow run must have originated with a tag named `demo-tag`, in a repository named `octo-repo` that is owned by the `octo-org` organization:
|
||||
特定のタグにフィルター処理する subject を作成できます。 この例で、ワークフロー実行は、`octo-org` 組織が所有する `octo-repo` というリポジトリ内の `demo-tag` というタグで開始されている必要があります。
|
||||
|
||||
| | |
|
||||
| ------ | ----------- |
|
||||
| Syntax: | `repo:<orgName/repoName>:ref:refs/tags/<tagName>` |
|
||||
| Example:| `repo:octo-org/octo-repo:ref:refs/tags/demo-tag` |
|
||||
| 構文: | `repo:<orgName/repoName>:ref:refs/tags/<tagName>` |
|
||||
| 例:| `repo:octo-org/octo-repo:ref:refs/tags/demo-tag` |
|
||||
|
||||
### Configuring the subject in your cloud provider
|
||||
### クラウド プロバイダーでの subject の構成
|
||||
|
||||
To configure the subject in your cloud provider's trust relationship, you must add the subject string to its trust configuration. The following examples demonstrate how various cloud providers can accept the same `repo:octo-org/octo-repo:ref:refs/heads/demo-branch` subject in different ways:
|
||||
クラウド プロバイダーの信頼関係で subject を構成するには、その信頼の構成に subject 文字列を追加する必要があります。 次の例は、さまざまなクラウド プロバイダーが同じ `repo:octo-org/octo-repo:ref:refs/heads/demo-branch` subject を異なる方法で受け入れる方法を示しています。
|
||||
|
||||
| | |
|
||||
| ------ | ----------- |
|
||||
| Amazon Web Services | `"{% ifversion ghes %}HOSTNAME/_services/token{% else %}token.actions.githubusercontent.com{% endif %}:sub": "repo:octo-org/octo-repo:ref:refs/heads/demo-branch"` |
|
||||
| アマゾン ウェブ サービス | `"{% ifversion ghes %}HOSTNAME/_services/token{% else %}token.actions.githubusercontent.com{% endif %}:sub": "repo:octo-org/octo-repo:ref:refs/heads/demo-branch"` |
|
||||
| Azure| `repo:octo-org/octo-repo:ref:refs/heads/demo-branch` |
|
||||
| Google Cloud Platform| `(assertion.sub=='repo:octo-org/octo-repo:ref:refs/heads/demo-branch')` |
|
||||
| HashiCorp Vault| `bound_subject="repo:octo-org/octo-repo:ref:refs/heads/demo-branch" ` |
|
||||
|
||||
For more information, see the guides listed in "[Enabling OpenID Connect for your cloud provider](#enabling-openid-connect-for-your-cloud-provider)."
|
||||
詳細については、「[クラウド プロバイダーの OpenID Connect を有効にする](#enabling-openid-connect-for-your-cloud-provider)」を参照してください。
|
||||
|
||||
## Updating your actions for OIDC
|
||||
## OIDC 向けのアクションの更新
|
||||
|
||||
To update your custom actions to authenticate using OIDC, you can use `getIDToken()` from the Actions toolkit to request a JWT from {% data variables.product.prodname_dotcom %}'s OIDC provider. For more information, see "OIDC Token" in the [npm package documentation](https://www.npmjs.com/package/@actions/core/v/1.6.0).
|
||||
OIDC を使って認証するためにカスタム アクションを更新するには、Actions ツールキットの `getIDToken()` を使って、{% data variables.product.prodname_dotcom %} の OIDC プロバイダーに JWT を要求することができます。 詳細については、[npm パッケージ ドキュメント](https://www.npmjs.com/package/@actions/core/v/1.6.0)の「OIDC トークン」を参照してください。
|
||||
|
||||
You could also use a `curl` command to request the JWT, using the following environment variables:
|
||||
また、`curl` コマンドを使い、次の環境変数を使って JWT を要求することもできます。
|
||||
|
||||
| | |
|
||||
| ------ | ----------- |
|
||||
| `ACTIONS_ID_TOKEN_REQUEST_URL` | The URL for {% data variables.product.prodname_dotcom %}'s OIDC provider. |
|
||||
| `ACTIONS_ID_TOKEN_REQUEST_TOKEN` | Bearer token for the request to the OIDC provider. |
|
||||
| `ACTIONS_ID_TOKEN_REQUEST_URL` | {% data variables.product.prodname_dotcom %} の OIDC プロバイダーの URL。 |
|
||||
| `ACTIONS_ID_TOKEN_REQUEST_TOKEN` | OIDC プロバイダーに対する要求のベアラー トークン。 |
|
||||
|
||||
|
||||
For example:
|
||||
次に例を示します。
|
||||
|
||||
```shell{:copy}
|
||||
curl -H "Authorization: bearer $ACTIONS_ID_TOKEN_REQUEST_TOKEN" "$ACTIONS_ID_TOKEN_REQUEST_URL&audience=api://AzureADTokenExchange"
|
||||
```
|
||||
|
||||
### Adding permissions settings
|
||||
### アクセス許可設定の追加
|
||||
|
||||
{% data reusables.actions.oidc-permissions-token %}
|
||||
|
||||
{% ifversion actions-oidc-hardening-config %}
|
||||
## Customizing the token claims
|
||||
## トークン クレームのカスタマイズ
|
||||
|
||||
You can security harden your OIDC configuration by customizing the claims that are included with the JWT. These customisations allow you to define more granular trust conditions on your cloud roles when allowing your workflows to access resources hosted in the cloud:
|
||||
JWT に含まれる要求をカスタマイズすることで、OIDC 構成のセキュリティを強化できます。 これらのカスタマイズを使用すると、ワークフローがクラウドでホストされているリソースにアクセスできるときに、クラウド ロールに対してより詳しい信頼条件を定義できます。
|
||||
|
||||
{% ifversion ghec %} - For an additional layer of security, you can append the `issuer` url with your enterprise slug. This lets you set conditions on the issuer (`iss`) claim, configuring it to only accept JWT tokens from a unique `issuer` URL that must include your enterprise slug.{% endif %}
|
||||
- You can standardize your OIDC configuration by setting conditions on the subject (`sub`) claim that require JWT tokens to originate from a specific repository, reusable workflow, or other source.
|
||||
- You can define granular OIDC policies by using additional OIDC token claims, such as `repository_id` and `repo_visibility`. For more information, see "[Understanding the OIDC token](/actions/deployment/security-hardening-your-deployments/about-security-hardening-with-openid-connect#understanding-the-oidc-token)".
|
||||
{% ifversion ghec %} - セキュリティのレイヤーを追加するために、`issuer` URL に Enterprise スラッグを追加できます。 これにより、issuer (`iss`) の要求に条件を設定し、Enterprise スラッグを含める必要がある一意の `issuer` URL からの JWT トークンのみを受け入れるように構成できます。{% endif %}
|
||||
- 特定のリポジトリ、再利用可能なワークフロー、またはその他のソースからの JWT トークンを必要とする subject (`sub`) 要求に条件を設定することで、OIDC 構成を標準化できます。
|
||||
- `repository_id` や `repo_visibility` などの追加の OIDC トークン要求を使用して、詳しい OIDC ポリシーを定義できます。 詳しくは、「[OIDC トークンについて](/actions/deployment/security-hardening-your-deployments/about-security-hardening-with-openid-connect#understanding-the-oidc-token)」を参照してください。
|
||||
|
||||
To customize these claim formats, organization and repository admins can use the REST API endpoints described in the following sections.
|
||||
これらの要求形式をカスタマイズするには、Organization とリポジトリの管理者が、次のセクションで説明する REST API エンドポイントを使用できます。
|
||||
|
||||
{% ifversion ghec %}
|
||||
|
||||
### Switching to a unique token URL
|
||||
### 一意のトークン URL への切り替え
|
||||
|
||||
By default, the JWT is issued by {% data variables.product.prodname_dotcom %}'s OIDC provider at `https://token.actions.githubusercontent.com`. This path is presented to your cloud provider using the `iss` value in the JWT.
|
||||
既定では、JWT は `https://token.actions.githubusercontent.com` で {% data variables.product.prodname_dotcom %} の OIDC プロバイダーによって発行されます。 このパスは、JWT の `iss` の値を使用してクラウド プロバイダーに提示されます。
|
||||
|
||||
Enterprise admins can security harden their OIDC configuration by configuring their enterprise to receive tokens from a unique URL at `https://api.github.com/enterprises/<enterpriseSlug>/actions/oidc/customization/issuer`. Replace `<enterpriseSlug>` with the slug value of your enterprise.
|
||||
Enterprise 管理者は、`https://api.github.com/enterprises/<enterpriseSlug>/actions/oidc/customization/issuer` で一意の URL からトークンを受信するように Enterprise を構成することで、OIDC 構成のセキュリティを強化できます。 Enterprise のスラッグ値を `<enterpriseSlug>` で置き換えます。
|
||||
|
||||
This configuration means that your enterprise will receive the OIDC token from a unique URL, and you can then configure your cloud provider to only accept tokens from that URL. This helps ensure that only the enterprise's repositories can access your cloud resources using OIDC.
|
||||
この構成は、Enterprise が一意の URL から OIDC トークンを受け取り、その URL からのトークンのみを受け入れるようにクラウド プロバイダーを構成できることを意味します。 これにより、OIDC を使用してクラウド リソースにアクセスできるのが Enterprise のリポジトリだけになります。
|
||||
|
||||
To activate this setting for your enterprise, an enterprise admin must use the `/enterprises/{enterprise}/actions/oidc/customization/issuer` endpoint and specify `"include_enterprise_slug": true` in the request body. For more information, see "[Set the {% data variables.product.prodname_actions %} OIDC custom issuer policy for an enterprise](/rest/actions/oidc#set-the-github-actions-oidc-custom-issuer-policy-for-an-enterprise)."
|
||||
Enterprise でこの設定をアクティブにするには、Enterprise 管理者が `/enterprises/{enterprise}/actions/oidc/customization/issuer` エンドポイントを使用し、要求本文で `"include_enterprise_slug": true` を指定する必要があります。 詳しくは、「[Enterprise に {% data variables.product.prodname_actions %} OIDC カスタム issuer ポリシーを設定する](/rest/actions/oidc#set-the-github-actions-oidc-custom-issuer-policy-for-an-enterprise)」を参照してください。
|
||||
|
||||
After this setting is applied, the JWT will contain the updated `iss` value. In the following example, the `iss` key uses `octocat-inc` as its `enterpriseSlug` value:
|
||||
この設定を適用すると、JWT に更新された `iss` の値が含まれるようになります。 次の例では、`iss` キーが `octocat-inc` をその `enterpriseSlug` 値として使用しています。
|
||||
|
||||
```json
|
||||
{
|
||||
@@ -280,25 +283,25 @@ After this setting is applied, the JWT will contain the updated `iss` value. In
|
||||
|
||||
{% endif %}
|
||||
|
||||
### Customizing the subject claims for an organization
|
||||
### Organization の subject 要求のカスタマイズ
|
||||
|
||||
To configure organization-wide security, compliance, and standardization, you can customize the standard claims to suit your required access conditions. If your cloud provider supports conditions on subject claims, you can create a condition that checks whether the `sub` value matches the path of the reusable workflow, such as `"job_workflow_ref: "octo-org/octo-automation/.github/workflows/oidc.yml@refs/heads/main""`. The exact format will vary depending on your cloud provider's OIDC configuration. To configure the matching condition on {% data variables.product.prodname_dotcom %}, you can can use the REST API to require that the `sub` claim must always include a specific custom claim, such as `job_workflow_ref`. For more information, see "[Set the customization template for an OIDC subject claim for an organization](/rest/actions/oidc#set-the-customization-template-for-an-oidc-subject-claim-for-an-organization)."
|
||||
Organization 全体のセキュリティ、コンプライアンス、標準化を構成するため、必要なアクセス条件に合わせて標準要求をカスタマイズできます。 クラウド プロバイダーが subject 要求に関する条件をサポートしている場合は、`sub` の値が `"job_workflow_ref: "octo-org/octo-automation/.github/workflows/oidc.yml@refs/heads/main""` などの再利用可能なワークフローのパスと一致するかどうかをチェックする条件を作成できます。 正確な形式は、クラウド プロバイダーの OIDC 構成によって異なります。 {% data variables.product.prodname_dotcom %} に一致条件を構成するには、REST API を使用して、`sub` 要求に常に `job_workflow_ref` などの特定のカスタム要求を含める必要があることを求めることができます。 詳しくは、「[Organization の OIDC subject 要求用のカスタマイズ テンプレートを設定する](/rest/actions/oidc#set-the-customization-template-for-an-oidc-subject-claim-for-an-organization)」をご覧ください。
|
||||
|
||||
Customizing the claims results in a new format for the entire `sub` claim, which replaces the default predefined `sub` format in the token described in "[Example subject claims](/actions/deployment/security-hardening-your-deployments/about-security-hardening-with-openid-connect#example-subject-claims)."
|
||||
`sub` 要求全体で新しい形式で要求の結果をカスタマイズすると、「[subject 要求の例](/actions/deployment/security-hardening-your-deployments/about-security-hardening-with-openid-connect#example-subject-claims)」の説明にある、トークンの既定の事前定義 `sub` 形式が置き換えられます。
|
||||
|
||||
The following example templates demonstrate various ways to customize the subject claim. To configure these settings on {% data variables.product.prodname_dotcom %}, organization admins use the REST API to specify a list of claims that must be included in the subject (`sub`) claim. {% data reusables.actions.use-request-body-api %}
|
||||
次のテンプレート例は、subject 要求をカスタマイズするさまざまな方法を示しています。 {% data variables.product.prodname_dotcom %} でこれらの設定を構成するには、Organization 管理者が REST API を使用して、subject (`sub`) 要求に含める必要がある要求の一覧を指定します。 {% data reusables.actions.use-request-body-api %}
|
||||
|
||||
To customize your subject claims, you should first create a matching condition in your cloud provider's OIDC configuration, before customizing the configuration using the REST API. Once the configuration is completed, each time a new job runs, the OIDC token generated during that job will follow the new customization template. If the matching condition doesn't exist in the cloud provider's OIDC configuration before the job runs, the generated token might not be accepted by the cloud provider, since the cloud conditions may not be synchronized.
|
||||
subject 要求をカスタマイズするには、REST API を使用して構成をカスタマイズする前に、クラウド プロバイダーの OIDC 構成で一致条件を作成する必要があります。 構成が完了すると、新しいジョブが実行されるたびに、そのジョブの間に生成された OIDC トークンが新しいカスタマイズ テンプレートに従うようになります。 ジョブの実行前にクラウド プロバイダーの OIDC 構成に一致条件が存在しない場合、クラウド条件が同期されない可能性があるため、生成されたトークンがクラウド プロバイダーによって受け入れられない可能性があります。
|
||||
|
||||
{% note %}
|
||||
|
||||
**Note**: When the organization template is applied, it will not affect any existing repositories that already use OIDC. For existing repositories, as well as any new repositories that are created after the template has been applied, the repository owner will need to opt-in to receive this configuration. For more information, see "[Set the opt-in flag of an OIDC subject claim customization for a repository](/rest/actions/oidc#set-the-opt-in-flag-of-an-oidc-subject-claim-customization-for-a-repository)."
|
||||
**注**: Organization テンプレートを適用しても、OIDC を既に使用している既存のリポジトリには影響しません。 既存のリポジトリでは、テンプレートの適用後に作成された新しいリポジトリと同様に、リポジトリ所有者が、この構成を受け取るためにオプトインする必要があります。 詳しくは、「[リポジトリに OIDC subject 要求のカスタマイズのオプトイン フラグを設定する](/rest/actions/oidc#set-the-opt-in-flag-of-an-oidc-subject-claim-customization-for-a-repository)」を参照してください。
|
||||
|
||||
{% endnote %}
|
||||
|
||||
#### Example: Allowing repository based on visibility and owner
|
||||
#### 例: 可視性と所有者に基づいたリポジトリの許可
|
||||
|
||||
This example template allows the `sub` claim to have a new format, using `repository_owner` and `repository_visibility`:
|
||||
このテンプレート例では、`sub` 要求に `repository_owner` と `repository_visibility` を使用する新しい形式を指定できます。
|
||||
|
||||
```json
|
||||
{
|
||||
@@ -309,11 +312,11 @@ This example template allows the `sub` claim to have a new format, using `reposi
|
||||
}
|
||||
```
|
||||
|
||||
In your cloud provider's OIDC configuration, configure the `sub` condition to require that claims must include specific values for `repository_owner` and `repository_visibility`. For example: `"repository_owner: "monalisa":repository_visibility:private"`. The approach lets you restrict cloud role access to only private repositories within an organization or enterprise.
|
||||
クラウド プロバイダーの OIDC 構成で、条件に `repository_owner` と `repository_visibility` の特定の値を含める必要があることを要求する `sub` 条件を構成します。 (例: `"repository_owner: "monalisa":repository_visibility:private"`)。 この方法では、クラウド ロールのアクセスを、Organization または Enterprise 内のプライベート リポジトリのみに制限できます。
|
||||
|
||||
#### Example: Allowing access to all repositories with a specific owner
|
||||
#### 例: 特定の所有者が設定されているすべてのリポジトリへのアクセスの許可
|
||||
|
||||
This example template enables the `sub` claim to have a new format with only the value of `repository_owner`. {% data reusables.actions.use-request-body-api %}
|
||||
このテンプレート例では、`sub` 要求に `repository_owner` の値のみを含む新しい形式を指定できます。 {% data reusables.actions.use-request-body-api %}
|
||||
|
||||
```json
|
||||
{
|
||||
@@ -324,11 +327,11 @@ This example template enables the `sub` claim to have a new format with only the
|
||||
|
||||
```
|
||||
|
||||
In your cloud provider's OIDC configuration, configure the `sub` condition to require that claims must include a specific value for `repository_owner`. For example: `"repository_owner: "monalisa""`
|
||||
クラウド プロバイダーの OIDC 構成で、条件に `repository_owner` の特定の値を含める必要があることを要求する `sub` 条件を構成します。 例: `"repository_owner: "monalisa""`
|
||||
|
||||
#### Example: Requiring a reusable workflow
|
||||
#### 例: 再利用可能なワークフローの要求
|
||||
|
||||
This example template allows the `sub` claim to have a new format that contains the value of the `job_workflow_ref` claim. This enables an enterprise to use [reusable workflows](/actions/deployment/security-hardening-your-deployments/about-security-hardening-with-openid-connect#example-subject-claims) to enforce consistent deployments across its organizations and repositories.
|
||||
このテンプレート例では、`job_workflow_ref` 要求の値を含む新しい形式を `sub` 条件に指定できます。 これにより、Enterprise は[再利用可能なワークフロー](/actions/deployment/security-hardening-your-deployments/about-security-hardening-with-openid-connect#example-subject-claims) を使用して、Organization とリポジトリ全体に一貫した展開を適用できます。
|
||||
|
||||
{% data reusables.actions.use-request-body-api %}
|
||||
|
||||
@@ -340,13 +343,13 @@ This example template allows the `sub` claim to have a new format that contains
|
||||
}
|
||||
```
|
||||
|
||||
In your cloud provider's OIDC configuration, configure the `sub` condition to require that claims must include a specific value for `job_workflow_ref`. For example: `"job_workflow_ref: "octo-org/octo-automation/.github/workflows/oidc.yml@refs/heads/main""`.
|
||||
クラウド プロバイダーの OIDC 構成で、条件に `job_workflow_ref` の特定の値を含める必要があることを要求する `sub` 条件を構成します。 (例: `"job_workflow_ref: "octo-org/octo-automation/.github/workflows/oidc.yml@refs/heads/main""`)。
|
||||
|
||||
#### Example: Requiring a reusable workflow and other claims
|
||||
#### 例: 再利用可能なワークフローとその他の要求の要件化
|
||||
|
||||
The following example template combines the requirement of a specific reusable workflow with additional claims. {% data reusables.actions.use-request-body-api %}
|
||||
次のテンプレート例では、特定の再利用可能なワークフローの要件と追加の要求を組み合わせています。 {% data reusables.actions.use-request-body-api %}
|
||||
|
||||
This example also demonstrates how to use `"context"` to define your conditions. This is the part that follows the repository in the [default `sub` format](/actions/deployment/security-hardening-your-deployments/about-security-hardening-with-openid-connect#example-subject-claims). For example, when the job references an environment, the context contains: `environment:<environmentName>`.
|
||||
この例では、`"context"` を使用して条件を定義する方法も示しています。 これは、[既定の `sub` の形式](/actions/deployment/security-hardening-your-deployments/about-security-hardening-with-openid-connect#example-subject-claims)のリポジトリに続く部分です。 たとえば、ジョブが環境を参照する場合、コンテキストには `environment:<environmentName>` が含まれています。
|
||||
|
||||
```json
|
||||
{
|
||||
@@ -358,14 +361,13 @@ This example also demonstrates how to use `"context"` to define your conditions.
|
||||
}
|
||||
```
|
||||
|
||||
In your cloud provider's OIDC configuration, configure the `sub` condition to require that claims must include specific values for `repo`, `context`, and `job_workflow_ref`.
|
||||
クラウド プロバイダーの OIDC 構成で、条件に `repo`、`context`、`job_workflow_ref` の特定の値を含める必要があることを要求する `sub` 条件を構成します。
|
||||
|
||||
This customization template requires that the `sub` uses the following format: `repo:<orgName/repoName>:environment:<environmentName>:job_workflow_ref:<reusableWorkflowPath>`.
|
||||
For example: `"sub": "repo:octo-org/octo-repo:environment:prod:job_workflow_ref:octo-org/octo-automation/.github/workflows/oidc.yml@refs/heads/main"`
|
||||
このカスタマイズ テンプレートでは、`sub` が `repo:<orgName/repoName>:environment:<environmentName>:job_workflow_ref:<reusableWorkflowPath>` の形式を使用する必要があります。 例: `"sub": "repo:octo-org/octo-repo:environment:prod:job_workflow_ref:octo-org/octo-automation/.github/workflows/oidc.yml@refs/heads/main"`
|
||||
|
||||
#### Example: Granting access to a specific repository
|
||||
#### 例: 特定のリポジトリへのアクセスの許可
|
||||
|
||||
This example template lets you grant cloud access to all the workflows in a specific repository, across all branches/tags and environments. To help improve security, combine this template with the custom issuer URL described in "[Customizing the token URL for an enterprise](/actions/deployment/security-hardening-your-deployments/about-security-hardening-with-openid-connect#customizing-the-token-url-for-an-enterprise)."
|
||||
このテンプレート例では、すべてのブランチやタグ、そして環境にわたって、クラウドが特定のリポジトリ内のすべてのワークフローにアクセスできるようになります。 セキュリティを向上させるために、このテンプレートを「[Enterprise のトークン URL のカスタマイズ](/actions/deployment/security-hardening-your-deployments/about-security-hardening-with-openid-connect#customizing-the-token-url-for-an-enterprise)」で説明されているカスタム issuer の URL と組み合わせてください。
|
||||
|
||||
{% data reusables.actions.use-request-body-api %}
|
||||
|
||||
@@ -377,11 +379,11 @@ This example template lets you grant cloud access to all the workflows in a spec
|
||||
}
|
||||
```
|
||||
|
||||
In your cloud provider's OIDC configuration, configure the `sub` condition to require a `repo` claim that matches the required value.
|
||||
クラウド プロバイダーの OIDC 構成で、必要な値と一致する `repo` 要求を必要とするように `sub` 条件を構成します。
|
||||
|
||||
#### Example: Using system-generated GUIDs
|
||||
#### 例: システム生成 GUID の使用
|
||||
|
||||
This example template enables predictable OIDC claims with system-generated GUIDs that do not change between renames of entities (such as renaming a repository). {% data reusables.actions.use-request-body-api %}
|
||||
このテンプレート例では、エンティティの名前変更 (リポジトリの名前変更など) 間で変更されないシステム生成 GUID を使用する予測可能な OIDC 要求が有効になります。 {% data reusables.actions.use-request-body-api %}
|
||||
|
||||
```json
|
||||
{
|
||||
@@ -391,9 +393,9 @@ This example template enables predictable OIDC claims with system-generated GUID
|
||||
}
|
||||
```
|
||||
|
||||
In your cloud provider's OIDC configuration, configure the `sub` condition to require a `repository_id` claim that matches the required value.
|
||||
クラウド プロバイダーの OIDC 構成で、必要な値と一致する `repository_id` 要求を必要とするように `sub` 条件を構成します。
|
||||
|
||||
or:
|
||||
または
|
||||
|
||||
```json
|
||||
{
|
||||
@@ -403,11 +405,11 @@ or:
|
||||
}
|
||||
```
|
||||
|
||||
In your cloud provider's OIDC configuration, configure the `sub` condition to require a `repository_owner_id` claim that matches the required value.
|
||||
クラウド プロバイダーの OIDC 構成で、必要な値と一致する `repository_owner_id` 要求を必要とするように `sub` 条件を構成します。
|
||||
|
||||
#### Resetting your customizations
|
||||
#### カスタマイズのリセット
|
||||
|
||||
This example template resets the subject claims to the default format. {% data reusables.actions.use-request-body-api %} This template effectively opts out of any organization-level customization policy.
|
||||
このテンプレート例では、subject 要求を既定の形式にリセットしています。 {% data reusables.actions.use-request-body-api %} このテンプレートは、Organization レベルのカスタマイズ ポリシーから実質的にオプトアウトします。
|
||||
|
||||
```json
|
||||
{
|
||||
@@ -418,11 +420,11 @@ This example template resets the subject claims to the default format. {% data r
|
||||
}
|
||||
```
|
||||
|
||||
In your cloud provider's OIDC configuration, configure the `sub` condition to require that claims must include specific values for `repo` and `context`.
|
||||
クラウド プロバイダーの OIDC 構成で、条件に `repo` と `context` の特定の値を含める必要があることを要求する `sub` 条件を構成します。
|
||||
|
||||
#### Using the default subject claims
|
||||
#### 既定の subject 要求の使用
|
||||
|
||||
For repositories that can receive a subject claim policy from their organization, the repository owner can later choose to opt-out and instead use the default `sub` claim format. To configure this, the repository admin must use the REST API endpoint at "[Set the opt-out flag of an OIDC subject claim customization for a repository](/rest/actions/oidc#set-the-opt-out-flag-of-an-oidc-subject-claim-customization-for-a-repository)" with the following request body:
|
||||
Organization から subject 要求ポリシーを受け取ることができるリポジトリの場合、リポジトリ所有者は後でオプトアウトを選び、代わりに既定の `sub` 要求形式を使用できます。 これを構成するには、リポジトリ管理者が、次の要求本文で、「[リポジトリに OIDC subject 要求のカスタマイズのオプトアウト フラグを設定する](/rest/actions/oidc#set-the-opt-out-flag-of-an-oidc-subject-claim-customization-for-a-repository)」にある REST API エンドポイントを使用する必要があります。
|
||||
|
||||
```json
|
||||
{
|
||||
@@ -432,20 +434,20 @@ For repositories that can receive a subject claim policy from their organization
|
||||
|
||||
{% endif %}
|
||||
|
||||
## Updating your workflows for OIDC
|
||||
## OIDC 向けのワークフローの更新
|
||||
|
||||
You can now update your YAML workflows to use OIDC access tokens instead of secrets. Popular cloud providers have published their official login actions that make it easy for you to get started with OIDC. For more information about updating your workflows, see the cloud-specific guides listed below in "[Enabling OpenID Connect for your cloud provider](#enabling-openid-connect-for-your-cloud-provider)."
|
||||
シークレットではなく OIDC アクセス トークンを使うように YAML ワークフローを更新できるようになりました。 一般的なクラウド プロバイダーは公式のログイン アクションを公開しているので、OIDC を簡単に使い始めることができます。 ワークフローの更新の詳細については、「[クラウド プロバイダーの OpenID Connect を有効にする](#enabling-openid-connect-for-your-cloud-provider)」の後半に掲載されているクラウド固有のガイドを参照してください。
|
||||
|
||||
|
||||
## Enabling OpenID Connect for your cloud provider
|
||||
## クラウド プロバイダーの OpenID Connect を有効にする
|
||||
|
||||
To enable and configure OIDC for your specific cloud provider, see the following guides:
|
||||
特定のクラウド プロバイダーに対して OIDC を有効にして構成する方法については、次のガイドを参照してください。
|
||||
|
||||
- ["Configuring OpenID Connect in Amazon Web Services"](/actions/deployment/security-hardening-your-deployments/configuring-openid-connect-in-amazon-web-services)
|
||||
- ["Configuring OpenID Connect in Azure"](/actions/deployment/security-hardening-your-deployments/configuring-openid-connect-in-azure)
|
||||
- ["Configuring OpenID Connect in Google Cloud Platform"](/actions/deployment/security-hardening-your-deployments/configuring-openid-connect-in-google-cloud-platform)
|
||||
- ["Configuring OpenID Connect in Hashicorp Vault"](/actions/deployment/security-hardening-your-deployments/configuring-openid-connect-in-hashicorp-vault)
|
||||
- 「[アマゾン ウェブ サービスでの OpenID Connect の構成](/actions/deployment/security-hardening-your-deployments/configuring-openid-connect-in-amazon-web-services)」
|
||||
- 「[Azure での OpenID Connect の構成](/actions/deployment/security-hardening-your-deployments/configuring-openid-connect-in-azure)」
|
||||
- 「[Google Cloud Platform での OpenID Connect の構成](/actions/deployment/security-hardening-your-deployments/configuring-openid-connect-in-google-cloud-platform)」
|
||||
- 「[HashiCorp Vault での OpenID Connect の構成](/actions/deployment/security-hardening-your-deployments/configuring-openid-connect-in-hashicorp-vault)」
|
||||
|
||||
To enable and configure OIDC for another cloud provider, see the following guide:
|
||||
別のクラウド プロバイダーに対して OIDC を有効にして構成する方法については、次のガイドを参照してください。
|
||||
|
||||
- ["Configuring OpenID Connect in cloud providers"](/actions/deployment/security-hardening-your-deployments/configuring-openid-connect-in-cloud-providers)
|
||||
- 「[クラウド プロバイダーでの OpenID Connect の構成](/actions/deployment/security-hardening-your-deployments/configuring-openid-connect-in-cloud-providers)」
|
||||
|
||||
@@ -14,26 +14,33 @@ type: how_to
|
||||
topics:
|
||||
- Workflows
|
||||
- Security
|
||||
ms.openlocfilehash: c9b5daf88f6e2dc91aad8890a3a8833cfbd2b0f0
|
||||
ms.sourcegitcommit: dc42bb4a4826b414751ffa9eed38962c3e3fea8e
|
||||
ms.openlocfilehash: ecf00be738c711394bc4debf0088ca0cbe5a2d9c
|
||||
ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5
|
||||
ms.translationtype: HT
|
||||
ms.contentlocale: ja-JP
|
||||
ms.lasthandoff: 07/13/2022
|
||||
ms.locfileid: '146273051'
|
||||
ms.lasthandoff: 09/05/2022
|
||||
ms.locfileid: '147710276'
|
||||
---
|
||||
{% data reusables.actions.enterprise-beta %} {% data reusables.actions.enterprise-github-hosted-runners %}
|
||||
|
||||
## <a name="about-reusable-workflows"></a>再利用可能なワークフローについて
|
||||
## 再利用可能なワークフローについて
|
||||
|
||||
あるワークフローから別のワークフローにデプロイ ジョブをコピーして貼り付けるのではなく、デプロイ手順を実行する再利用可能なワークフローを作成できます。 「[ワークフローの再利用](/actions/learn-github-actions/reusing-workflows#access-to-reusable-workflows)」で説明されているアクセス要件のいずれかを満たしていれば、別のワークフローから再利用可能なワークフローを使用できます。
|
||||
|
||||
再利用可能なワークフローを OpenID Connect (OIDC) と組み合わせると、リポジトリ、組織、またはエンタープライズ全体で一貫したデプロイを実施することができます。 これを行うには、再利用可能なワークフローに基づいてクラウド ロールの信頼条件を定義します。
|
||||
「ワークフローの再利用 (/actions/learn-github-actions/reusing-workflows)」および「[OpenID Connect によるセキュリティ強化について](/actions/deployment/security-hardening-your-deployments/about-security-hardening-with-openid-connect)」で説明されている概念をよく理解している必要があります。
|
||||
|
||||
再利用可能なワークフローに基づいて信頼条件を作成するには、クラウド プロバイダーが `job_workflow_ref` のカスタム要求をサポートしている必要があります。 これにより、クラウド プロバイダーは、ジョブの元のリポジトリを特定できます。 クラウド プロバイダーが標準の要求 (_audience_ と _subject_) のみをサポートしている場合、再利用可能なワークフロー リポジトリのジョブであることを判断できなくなります。 `job_workflow_ref` をサポートするクラウド プロバイダーには、Google Cloud Platform と HashiCorp Vault があります。
|
||||
## 信頼条件の定義
|
||||
|
||||
先に進む前に、[再利用可能なワークフロー](/actions/learn-github-actions/reusing-workflows)と [OpenID Connect](/actions/deployment/security-hardening-your-deployments/about-security-hardening-with-openid-connect) の概念を理解しておく必要があります。
|
||||
再利用可能なワークフローを OpenID Connect (OIDC) と組み合わせると、リポジトリ、組織、またはエンタープライズ全体で一貫したデプロイを実施することができます。 これを行うには、再利用可能なワークフローに基づいてクラウド ロールの信頼条件を定義します。 使用可能なオプションは、ご利用のクラウド プロバイダーによって異なります。
|
||||
|
||||
## <a name="how-the-token-works-with-reusable-workflows"></a>再利用可能なワークフローでのトークンのしくみ
|
||||
- **`job_workflow_ref` の使用**:
|
||||
- 再利用可能なワークフローに基づいて信頼条件を作成するには、クラウド プロバイダーが `job_workflow_ref` のカスタム要求をサポートしている必要があります。 これにより、クラウド プロバイダーは、ジョブの元のリポジトリを特定できます。
|
||||
- 標準のクレーム (対象ユーザー (`aud`) とサブジェクト (`sub`)) のみをサポートするクラウドの場合は、API を使用して `sub` クレームをカスタマイズして `job_workflow_ref` を含めることができます。 詳しくは、「[トークン クレームのカスタマイズ](/actions/deployment/security-hardening-your-deployments/about-security-hardening-with-openid-connect#customizing-the-token-claims)」を参照してください。 カスタム クレームは、現在、Google Cloud Platform と HashiCorp Vault でサポートされています。
|
||||
|
||||
- **トークン クレームのカスタマイズ**:
|
||||
- JWT に含まれる発行者 (`iss`) とサブジェクト (`sub`) のクレームをカスタマイズすることで、信頼条件をより細かく構成できます。 詳しくは、「[トークン クレームのカスタマイズ](/actions/deployment/security-hardening-your-deployments/about-security-hardening-with-openid-connect#customizing-the-token-claims)」を参照してください。
|
||||
|
||||
## 再利用可能なワークフローでのトークンのしくみ
|
||||
|
||||
ワークフロー実行中、{% data variables.product.prodname_dotcom %} の OIDC プロバイダーは、ジョブに関する情報を含む OIDC トークンをクラウド プロバイダーに提示します。 そのジョブが再利用可能なワークフローの一部である場合、トークンには、呼び出し元ワークフローに関する情報を含む標準の要求が含まれます。また、呼び出されたワークフローに関する情報を含む `job_workflow_ref` というカスタム要求も含まれます。
|
||||
|
||||
@@ -76,7 +83,7 @@ ms.locfileid: '146273051'
|
||||
|
||||
再利用可能なワークフローでデプロイ手順を実行する場合、通常、特定のクラウド ロールへのアクセスが必要になります。また、組織内のどのリポジトリからもその再利用可能なワークフローを呼び出せるようにすることもできます。 これを許可するには、任意のリポジトリと任意の呼び出し元ワークフローを許可する信頼条件を作成し、組織と呼び出されたワークフローでフィルター処理します。 例については、次のセクションを参照してください。
|
||||
|
||||
## <a name="examples"></a>例
|
||||
## 例
|
||||
|
||||
**特定のリポジトリ内の再利用可能なワークフローにフィルター処理する**
|
||||
|
||||
|
||||
@@ -12,10 +12,10 @@ children:
|
||||
- using-the-github-cli-on-a-runner
|
||||
- using-concurrency-expressions-and-a-test-matrix
|
||||
ms.openlocfilehash: ead17cbc8c35735e3676aa7b992ebd05ac6686ae
|
||||
ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5
|
||||
ms.sourcegitcommit: fcf3546b7cc208155fb8acdf68b81be28afc3d2d
|
||||
ms.translationtype: HT
|
||||
ms.contentlocale: ja-JP
|
||||
ms.lasthandoff: 09/05/2022
|
||||
ms.locfileid: '147062579'
|
||||
ms.lasthandoff: 09/11/2022
|
||||
ms.locfileid: '147881091'
|
||||
---
|
||||
|
||||
|
||||
@@ -11,10 +11,10 @@ type: how_to
|
||||
topics:
|
||||
- Workflows
|
||||
ms.openlocfilehash: f313a294bc2515564787268112f064b72d339d32
|
||||
ms.sourcegitcommit: 1309b46201604c190c63bfee47dce559003899bf
|
||||
ms.sourcegitcommit: 76b840f45ba85fb79a7f0c1eb43bc663b3eadf2b
|
||||
ms.translationtype: HT
|
||||
ms.contentlocale: ja-JP
|
||||
ms.lasthandoff: 09/10/2022
|
||||
ms.lasthandoff: 09/12/2022
|
||||
ms.locfileid: '146749530'
|
||||
---
|
||||
{% data reusables.actions.enterprise-github-hosted-runners %}
|
||||
|
||||
@@ -7,11 +7,11 @@ type: reference
|
||||
miniTocMaxHeadingLevel: 4
|
||||
shortTitle: Customize containers used by jobs
|
||||
ms.openlocfilehash: 774aad09c504a09f0bf4f60af286952ee24f89b5
|
||||
ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5
|
||||
ms.sourcegitcommit: fb047f9450b41b24afc43d9512a5db2a2b750a2a
|
||||
ms.translationtype: HT
|
||||
ms.contentlocale: ja-JP
|
||||
ms.lasthandoff: 09/05/2022
|
||||
ms.locfileid: '147080311'
|
||||
ms.lasthandoff: 09/11/2022
|
||||
ms.locfileid: '147881164'
|
||||
---
|
||||
{% note %}
|
||||
|
||||
|
||||
@@ -29,10 +29,10 @@ children:
|
||||
- /monitoring-and-troubleshooting-self-hosted-runners
|
||||
- /removing-self-hosted-runners
|
||||
ms.openlocfilehash: 512f00d6133fbbe50abd944a588e6414eec94720
|
||||
ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5
|
||||
ms.sourcegitcommit: 76b840f45ba85fb79a7f0c1eb43bc663b3eadf2b
|
||||
ms.translationtype: HT
|
||||
ms.contentlocale: ja-JP
|
||||
ms.lasthandoff: 09/05/2022
|
||||
ms.lasthandoff: 09/12/2022
|
||||
ms.locfileid: '146381457'
|
||||
---
|
||||
{% data reusables.actions.enterprise-beta %} {% data reusables.actions.enterprise-github-hosted-runners %}
|
||||
|
||||
@@ -11,6 +11,7 @@ versions:
|
||||
ghae: '*'
|
||||
ghec: '*'
|
||||
type: tutorial
|
||||
miniTocMaxHeadingLevel: 3
|
||||
defaultPlatform: linux
|
||||
shortTitle: Monitor & troubleshoot
|
||||
---
|
||||
@@ -265,3 +266,20 @@ User=runner-user
|
||||
|
||||
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.
|
||||
{% 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
|
||||
```
|
||||
|
||||
@@ -27,10 +27,10 @@ children:
|
||||
- /environment-variables
|
||||
- /usage-limits-billing-and-administration
|
||||
ms.openlocfilehash: dcc50450ec26cbe5336d3eaca9c80df29a936ab9
|
||||
ms.sourcegitcommit: fb047f9450b41b24afc43d9512a5db2a2b750a2a
|
||||
ms.sourcegitcommit: 76b840f45ba85fb79a7f0c1eb43bc663b3eadf2b
|
||||
ms.translationtype: HT
|
||||
ms.contentlocale: ja-JP
|
||||
ms.lasthandoff: 09/11/2022
|
||||
ms.lasthandoff: 09/12/2022
|
||||
ms.locfileid: '145116933'
|
||||
---
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
---
|
||||
title: Understanding GitHub Actions
|
||||
title: GitHub Actions を理解する
|
||||
shortTitle: Understanding GitHub Actions
|
||||
intro: 'Learn the basics of {% data variables.product.prodname_actions %}, including core concepts and essential terminology.'
|
||||
intro: 'コア概念や重要な用語など、{% data variables.product.prodname_actions %} の基本について説明します。'
|
||||
miniTocMaxHeadingLevel: 3
|
||||
redirect_from:
|
||||
- /github/automating-your-workflow-with-github-actions/core-concepts-for-github-actions
|
||||
@@ -16,93 +16,96 @@ versions:
|
||||
type: overview
|
||||
topics:
|
||||
- Fundamentals
|
||||
ms.openlocfilehash: b1e82506da6ede65b5ab93f94ce67dee681f81f1
|
||||
ms.sourcegitcommit: 478f2931167988096ae6478a257f492ecaa11794
|
||||
ms.translationtype: HT
|
||||
ms.contentlocale: ja-JP
|
||||
ms.lasthandoff: 09/09/2022
|
||||
ms.locfileid: '147763573'
|
||||
---
|
||||
{% 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 %} リポジトリに対するすべての pull request をビルドしてテストしたり、マージされた pull request を運用環境にデプロイしたりするワークフローを作成できます。
|
||||
|
||||
{% 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 であるだけでなく、リポジトリで他のイベントが発生したときにワークフローを実行できます。 たとえば、リポジトリで新しい issue が作成されるたびに、適切なラベルを自動的に追加するワークフローを実行できます。
|
||||
|
||||
{% 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.product.product_location %}. {% data reusables.actions.self-hosted-runner-locations %}
|
||||
{% data variables.product.product_location %} のワークフローを実行するには、独自の Linux、Windows、または macOS 仮想マシンをホストする必要があります。 {% 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 %} を Enterprise に導入する方法の詳細については、「[Enterprise への {% 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.
|
||||
リポジトリで、pull request のオープンや issue の作成などの _イベント_ が発生したときにトリガーされるように {% data variables.product.prodname_actions %} _ワークフロー_ を構成できます。 ワークフローには、1 つ以上の _ジョブ_ が含まれており、ジョブは順次にまたは並列で実行できます。 各ジョブは、専用の仮想マシン _ランナー_ 内、またはコンテナー内で実行され、定義した _スクリプト_ を実行するか、または _アクション_ (ワークフローを簡略化できる再利用可能な拡張機能) を実行する 1 つ以上のステップで構成されます。
|
||||
|
||||

|
||||

|
||||
|
||||
### Workflows
|
||||
|
||||
{% data reusables.actions.about-workflows-long %}
|
||||
|
||||
{% ifversion fpt or ghes > 3.3 or ghae-issue-4757 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 %} ワークフローを別のワークフローで参照できます。「[Reusing workflows](/actions/learn-github-actions/reusing-workflows)」 (ワークフローの再利用) を参照してください。{% endif %}
|
||||
|
||||
For more information about workflows, see "[Using workflows](/actions/using-workflows)."
|
||||
ワークフローの詳細については、「[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.
|
||||
イベントは、ワークフロー実行をトリガーする、リポジトリ内の特定のアクティビティです。 たとえば、pull request が作成されたとき、issue が開かれたとき、またはリポジトリにコミットがプッシュされたときに、{% 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.
|
||||
ジョブは、同じランナーで実行される、ワークフロー内の一連の _ステップ_ です。 各ステップは、実行されるシェル スクリプト、または実行される _アクション_ のいずれかです。 ステップは順番に実行され、相互に依存します。 各ステップは同じランナーで実行されるため、あるステップから別のステップにデータを共有できます。 たとえば、アプリケーションをビルドするステップの後に、ビルドされたアプリケーションをテストするステップを続けることができます。
|
||||
|
||||
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)."
|
||||
ジョブの詳細については、「[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 %} 各ランナーでは、一度に 1 つのジョブを実行できます。 {% ifversion ghes or ghae %} {% data variables.product.product_name %} の場合、独自のランナーをホストする必要があります。 {% elsif fpt or ghec %}{% data variables.product.company_short %} では、ワークフローを実行するために、Ubuntu Linux、Microsoft Windows、macOS ランナーが提供されます。各ワークフロー実行は、新しくプロビジョニングされた仮想マシンで実行されます。 {% ifversion actions-hosted-runners %} {% data variables.product.prodname_dotcom %} には、より大きな構成で使うことができる {% data variables.actions.hosted_runner %} も用意されています。 詳しくは、「[{% data variables.actions.hosted_runner %} を使用する](/actions/using-github-hosted-runners/using-larger-runners)」を参照してください。 {% endif %}異なるオペレーティング システムまたは特定のハードウェア構成が必要な場合、独自のランナーをホストできます。{% endif %} {% ifversion fpt or ghec %}セルフホステッド ランナーについて詳しくは{% endif %}、「[自分のランナーをホストする](/actions/hosting-your-own-runners)」を参照してください。
|
||||
|
||||
{% data reusables.actions.workflow-basic-example-and-explanation %}
|
||||
|
||||
## More complex examples
|
||||
## より複雑な例
|
||||
{% data reusables.actions.link-to-example-library %}
|
||||
|
||||
## Next steps
|
||||
## 次の手順
|
||||
|
||||
- To continue learning about {% data variables.product.prodname_actions %}, see "[Finding and customizing actions](/actions/learn-github-actions/finding-and-customizing-actions)."
|
||||
- {% data variables.product.prodname_actions %} について引き続き学習するには、「[Finding and customizing actions](/actions/learn-github-actions/finding-and-customizing-actions)」 (アクションの検出とカスタマイズ) を参照してください。
|
||||
{% ifversion fpt or ghec or ghes %}
|
||||
- To understand how billing works for {% data variables.product.prodname_actions %}, see "[About billing for {% data variables.product.prodname_actions %}](/actions/reference/usage-limits-billing-and-administration#about-billing-for-github-actions)."
|
||||
- {% data variables.product.prodname_actions %} の課金のしくみについては、「[{% data variables.product.prodname_actions %} の課金について](/actions/reference/usage-limits-billing-and-administration#about-billing-for-github-actions)」を参照してください。
|
||||
{% endif %}
|
||||
|
||||
## Contacting support
|
||||
## サポートへの問い合わせ
|
||||
|
||||
{% 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 %}
|
||||
|
||||
@@ -13,11 +13,11 @@ topics:
|
||||
- Workflows
|
||||
- Project management
|
||||
ms.openlocfilehash: 8e80990a1a533ed303f47cbad8dafb95c890893d
|
||||
ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5
|
||||
ms.sourcegitcommit: 5f9527483381cfb1e41f2322f67c80554750a47d
|
||||
ms.translationtype: HT
|
||||
ms.contentlocale: ja-JP
|
||||
ms.lasthandoff: 09/05/2022
|
||||
ms.locfileid: '147410436'
|
||||
ms.lasthandoff: 09/11/2022
|
||||
ms.locfileid: '147884310'
|
||||
---
|
||||
{% data reusables.actions.enterprise-beta %} {% data reusables.actions.enterprise-github-hosted-runners %}
|
||||
|
||||
|
||||
@@ -9,10 +9,10 @@ versions:
|
||||
ghae: '*'
|
||||
ghec: '*'
|
||||
ms.openlocfilehash: ef8d0a7f1708b8c23705a04496b3d78737aec450
|
||||
ms.sourcegitcommit: fb047f9450b41b24afc43d9512a5db2a2b750a2a
|
||||
ms.sourcegitcommit: 80842b4e4c500daa051eff0ccd7cde91c2d4bb36
|
||||
ms.translationtype: HT
|
||||
ms.contentlocale: ja-JP
|
||||
ms.lasthandoff: 09/10/2022
|
||||
ms.lasthandoff: 09/12/2022
|
||||
ms.locfileid: '147521523'
|
||||
---
|
||||
{% data reusables.actions.enterprise-beta %} {% data reusables.actions.enterprise-github-hosted-runners %}
|
||||
|
||||
@@ -14,10 +14,10 @@ topics:
|
||||
- Fundamentals
|
||||
shortTitle: Quickstart
|
||||
ms.openlocfilehash: 164aef041c509264c9e8440d5339bce3cf4aaaca
|
||||
ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5
|
||||
ms.sourcegitcommit: 80842b4e4c500daa051eff0ccd7cde91c2d4bb36
|
||||
ms.translationtype: HT
|
||||
ms.contentlocale: ja-JP
|
||||
ms.lasthandoff: 09/05/2022
|
||||
ms.lasthandoff: 09/12/2022
|
||||
ms.locfileid: '146139458'
|
||||
---
|
||||
{% data reusables.actions.enterprise-beta %} {% data reusables.actions.enterprise-github-hosted-runners %}
|
||||
|
||||
@@ -15,7 +15,7 @@ ms.openlocfilehash: 3deac3e698cec0e3008defd38d681a1ffa30a5d2
|
||||
ms.sourcegitcommit: fcf3546b7cc208155fb8acdf68b81be28afc3d2d
|
||||
ms.translationtype: HT
|
||||
ms.contentlocale: ja-JP
|
||||
ms.lasthandoff: 09/10/2022
|
||||
ms.locfileid: '145121141'
|
||||
ms.lasthandoff: 09/11/2022
|
||||
ms.locfileid: '147884924'
|
||||
---
|
||||
|
||||
|
||||
@@ -10,11 +10,11 @@ topics:
|
||||
- Actions
|
||||
- Developer
|
||||
ms.openlocfilehash: 2a74b149596e0158cdc6b5e40508b1d4a54eb8e6
|
||||
ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5
|
||||
ms.sourcegitcommit: 5f9527483381cfb1e41f2322f67c80554750a47d
|
||||
ms.translationtype: HT
|
||||
ms.contentlocale: ja-JP
|
||||
ms.lasthandoff: 09/05/2022
|
||||
ms.locfileid: '145912187'
|
||||
ms.lasthandoff: 09/11/2022
|
||||
ms.locfileid: '147884270'
|
||||
---
|
||||
{% data reusables.actions.enterprise-beta %} {% data reusables.actions.enterprise-github-hosted-runners %}
|
||||
|
||||
|
||||
@@ -14,14 +14,14 @@ type: tutorial
|
||||
topics:
|
||||
- Workflows
|
||||
miniTocMaxHeadingLevel: 3
|
||||
ms.openlocfilehash: 558d5f186ce75d9ace6f6c6be63e2e3eaeff3230
|
||||
ms.sourcegitcommit: b0323777cfe4324a09552d0ea268d1afacc3da37
|
||||
ms.openlocfilehash: efae730b48d2423821bb95ac639df355e6b9b5d9
|
||||
ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5
|
||||
ms.translationtype: HT
|
||||
ms.contentlocale: ja-JP
|
||||
ms.lasthandoff: 08/17/2022
|
||||
ms.locfileid: '147580672'
|
||||
ms.lasthandoff: 09/05/2022
|
||||
ms.locfileid: '147710308'
|
||||
---
|
||||
## <a name="about-caching-workflow-dependencies"></a>ワークフローの依存関係のキャッシングについて
|
||||
## ワークフローの依存関係のキャッシングについて
|
||||
|
||||
ワークフローの実行は、しばしば他の実行と同じ出力あるいはダウンロードされた依存関係を再利用します。 たとえばMaven、Gradle、npm、Yarnといったパッケージ及び依存関係管理ツールは、ダウンロードされた依存関係のローカルキャッシュを保持します。
|
||||
|
||||
@@ -52,15 +52,15 @@ ms.locfileid: '147580672'
|
||||
|
||||
ワークフロー実行のアーティファクトについて詳しくは、「[アーティファクトを使用してワークフロー データを永続化する](/github/automating-your-workflow-with-github-actions/persisting-workflow-data-using-artifacts)」を参照してください。
|
||||
|
||||
## <a name="restrictions-for-accessing-a-cache"></a>キャッシュへのアクセスについての制限
|
||||
## キャッシュへのアクセスについての制限
|
||||
|
||||
ワークフローは、現在のブランチ、ベース ブランチ (フォークされたリポジトリのベース ブランチを含む)、または既定のブランチ (通常 `main`) で作成されたキャッシュにアクセスして復元できます。 たとえば、デフォルトブランチで作成されたキャッシュは、どのPull Requestからもアクセスできます。 また、ブランチ `feature-b` にベース ブランチ `feature-a` がある場合、`feature-b` でトリガーされたワークフローは、既定のブランチ (`main`)、`feature-a`、および `feature-b` で作成されたキャッシュにアクセスすることができます。
|
||||
|
||||
アクセス制限は、さまざまなブランチ間に論理境界を作成することで、キャッシュの分離とセキュリティを提供します。 たとえば、ブランチ `feature-a` (ベース `main` を使用) のために作成されたキャッシュは、ブランチ `feature-c` (ベース`main` を使用) の pull request にはアクセスできません。
|
||||
アクセス制限を使用すると、さまざまなブランチまたはタグ間に論理境界を作成することで、キャッシュを分離しセキュリティで保護することができます。 たとえば、ブランチ `feature-a` (ベース `main` を使用) のために作成されたキャッシュは、ブランチ `feature-c` (ベース`main` を使用) の pull request にはアクセスできません。 同様の行上で、(ベースの `main` からの) タグ `release-a` 用に作成されるキャッシュは、(ベース `main` を使用して) タグ `release-b` に対してトリガーされるワークフローにアクセスできません。
|
||||
|
||||
リポジトリ内の複数のワークフローは、キャッシュ エントリを共有します。 ワークフロー内のブランチ用に作成されたキャッシュは、同じリポジトリとブランチの別のワークフローからアクセスおよび復元できます。
|
||||
|
||||
## <a name="using-the-cache-action"></a>`cache` アクションの使用
|
||||
## `cache` アクションの使用
|
||||
|
||||
[`cache` action](https://github.com/actions/cache) アクションは、指定した `key` に基づいてキャッシュの復元を試みます。 アクションでキャッシュが見つかると、アクションは、キャッシュされたファイルを構成した `path` に復元します。
|
||||
|
||||
@@ -68,7 +68,7 @@ ms.locfileid: '147580672'
|
||||
|
||||
必要に応じて、`key` が既存のキャッシュと一致しない場合に使用する `restore-keys` のリストを指定できます。 `restore-keys` はキャッシュ キーと部分的に一致する可能性があるため、`restore-keys` のリストは別のブランチからキャッシュを復元する場合に便利です。 `restore-keys` の照合の詳細については、「[キャッシュ キーのマッチング](#matching-a-cache-key)」を参照してください。
|
||||
|
||||
### <a name="input-parameters-for-the-cache-action"></a>`cache` アクションの入力パラメーター
|
||||
### `cache` アクションの入力パラメーター
|
||||
|
||||
- `key`: **必須** キャッシュの保存時に作成されたキーと、キャッシュの検索に使用されるキー。 変数、コンテキスト値、静的な文字列、関数の任意の組み合わせが使えます。 キーの長さは最大で512文字であり、キーが最大長よりも長いとアクションは失敗します。
|
||||
- `path`: **必須** キャッシュまたは復元するランナー上のパス。
|
||||
@@ -95,11 +95,11 @@ ms.locfileid: '147580672'
|
||||
```
|
||||
{% endraw %}
|
||||
|
||||
### <a name="output-parameters-for-the-cache-action"></a>`cache` アクションの出力パラメーター
|
||||
### `cache` アクションの出力パラメーター
|
||||
|
||||
- `cache-hit`: キーに対して完全一致が見つかったかどうかを示すブール値。
|
||||
|
||||
### <a name="example-using-the-cache-action"></a>`cache` アクションの使用例
|
||||
### `cache` アクションの使用例
|
||||
|
||||
次の例では、`package-lock.json` ファイル内のパッケージが変更されたとき、またはランナーのオペレーティング システムが変更されたときに、新しいキャッシュを作成します。 キャッシュ キーは、コンテキストと式を使用して、ランナーのオペレーティング システムと `package-lock.json` ファイルの SHA-256 ハッシュを含むキーを生成します。
|
||||
|
||||
@@ -155,7 +155,7 @@ jobs:
|
||||
|
||||
キャッシュ照合プロセスの詳細については、「[キャッシュキーのマッチング](#matching-a-cache-key)」を参照してください。 キャッシュをいったん作成すると、既存のキャッシュの内容を変更することはできませんが、新しいキーで新しいキャッシュを作成することはできます。
|
||||
|
||||
### <a name="using-contexts-to-create-cache-keys"></a>コンテキストを使ったキャッシュキーの作成
|
||||
### コンテキストを使ったキャッシュキーの作成
|
||||
|
||||
キャッシュキーには、コンテキスト、関数、リテラル、{% data variables.product.prodname_actions %}がサポートする演算子を含めることができます。 詳細については、「[コンテキスト](/actions/learn-github-actions/contexts)」および「[式](/actions/learn-github-actions/expressions)」を参照してください。
|
||||
|
||||
@@ -175,7 +175,7 @@ npm-${{ hashFiles('package-lock.json') }}
|
||||
npm-d5ea0750
|
||||
```
|
||||
|
||||
### <a name="using-the-output-of-the-cache-action"></a>`cache` アクションの出力の使用
|
||||
### `cache` アクションの出力の使用
|
||||
|
||||
`cache` アクションの出力を使用すると、キャッシュ ヒットやキャッシュ ミスが発生したどうかに基づいて操作を実行することができます。 指定した `key` のキャッシュに完全一致が見つかった場合、`cache-hit` の出力は `true` に設定されます。
|
||||
|
||||
@@ -188,13 +188,13 @@ npm-d5ea0750
|
||||
run: npm list
|
||||
```
|
||||
|
||||
## <a name="matching-a-cache-key"></a>キャッシュキーのマッチング
|
||||
## キャッシュキーのマッチング
|
||||
|
||||
`cache` アクションは、最初にワークフロー実行を含むブランチで、`key` および `restore-keys` のキャッシュ ヒットを検索します。 現在のブランチにヒットがない場合、`cache` アクションは親ブランチとアップストリーム ブランチの `key` および `restore-keys` を検索します。
|
||||
|
||||
`restore-keys` では、`key` でキャッシュ ミスが発生した場合に使用する代替復元キーのリストを指定できます。 特定の度合いが強いものから弱いものへ並べて複数のリストアキーを作成できます。 `cache` アクションは `restore-keys` を順番に検索します。 キーが直接マッチしなかった場合、アクションはリストアキーでプレフィックスされたキーを検索します。 リストアキーに対して複数の部分一致があった場合、アクションは最も最近に作成されたキャッシュを返します。
|
||||
|
||||
### <a name="example-using-multiple-restore-keys"></a>複数のリストアキーの利用例
|
||||
### 複数のリストアキーの利用例
|
||||
|
||||
{% raw %}
|
||||
```yaml
|
||||
@@ -222,7 +222,7 @@ restore-keys: |
|
||||
1. **`npm-feature-`** は `npm-feature-` というプレフィックスが付いたキャッシュ キーと一致します。
|
||||
1. **`npm-`** は `npm-` というプレフィックスが付いたすべてのキーと一致します。
|
||||
|
||||
#### <a name="example-of-search-priority"></a>検索の優先度の例
|
||||
#### 検索の優先度の例
|
||||
|
||||
```yaml
|
||||
key:
|
||||
@@ -241,7 +241,7 @@ restore-keys: |
|
||||
1. `main` ブランチ内のキー `npm-feature-`
|
||||
1. `main` ブランチ内のキー `npm-`
|
||||
|
||||
## <a name="usage-limits-and-eviction-policy"></a>利用制限と退去のポリシー
|
||||
## 利用制限と退去のポリシー
|
||||
|
||||
{% data variables.product.prodname_dotcom %}は、7日間以上アクセスされていないキャッシュエントリを削除します。 保存できるキャッシュの数に制限はありませんが、リポジトリ内のすべてのキャッシュの合計サイズは制限されています{% ifversion actions-cache-policy-apis %}。 既定では、リポジトリあたり 10 GB の制限ですが、この制限は、エンタープライズ所有者やリポジトリ管理者が設定したポリシーによって変わる場合があります。{% else %} (最大 10 GB)。{% endif %}
|
||||
|
||||
@@ -252,7 +252,7 @@ restore-keys: |
|
||||
|
||||
{% ifversion actions-cache-management %}
|
||||
|
||||
## <a name="managing-caches"></a>キャッシュの管理
|
||||
## キャッシュの管理
|
||||
|
||||
{% data variables.product.product_name %} REST API を使用してキャッシュを管理できます。 {% ifversion actions-cache-list-delete-apis %}API を使って、キャッシュ エントリの一覧表示と削除を行い、キャッシュの使用状況を確認できます。{% elsif actions-cache-management %}現時点では、API を使ってキャッシュの使用状況を確認できます。今後の更新で、さらに多くの機能が追加される予定です。{% endif %}詳しくは、REST API のドキュメント「[{% data variables.product.prodname_actions %} キャッシュ](/rest/actions/cache)」をご覧ください。
|
||||
|
||||
|
||||
@@ -16,11 +16,11 @@ topics:
|
||||
- Workflows
|
||||
- CI
|
||||
ms.openlocfilehash: cbaecefc90f3593b8883c7ccad5256b4addf972c
|
||||
ms.sourcegitcommit: fcf3546b7cc208155fb8acdf68b81be28afc3d2d
|
||||
ms.sourcegitcommit: 5f9527483381cfb1e41f2322f67c80554750a47d
|
||||
ms.translationtype: HT
|
||||
ms.contentlocale: ja-JP
|
||||
ms.lasthandoff: 09/10/2022
|
||||
ms.locfileid: '145120958'
|
||||
ms.lasthandoff: 09/11/2022
|
||||
ms.locfileid: '147884190'
|
||||
---
|
||||
{% data reusables.actions.enterprise-beta %} {% data reusables.actions.enterprise-github-hosted-runners %}
|
||||
|
||||
|
||||
@@ -12,11 +12,11 @@ versions:
|
||||
ghec: '*'
|
||||
type: how_to
|
||||
ms.openlocfilehash: bf80624fe1118d424a57f7c22efab6368c914819
|
||||
ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5
|
||||
ms.sourcegitcommit: 5f9527483381cfb1e41f2322f67c80554750a47d
|
||||
ms.translationtype: HT
|
||||
ms.contentlocale: ja-JP
|
||||
ms.lasthandoff: 09/05/2022
|
||||
ms.locfileid: '146178592'
|
||||
ms.lasthandoff: 09/11/2022
|
||||
ms.locfileid: '147884262'
|
||||
---
|
||||
{% data reusables.actions.enterprise-beta %} {% data reusables.actions.enterprise-github-hosted-runners %}
|
||||
|
||||
|
||||
@@ -21,10 +21,10 @@ topics:
|
||||
- Infrastructure
|
||||
- Networking
|
||||
ms.openlocfilehash: 0dea06870a1bc7bc951580acf3d83a9d2f0984c2
|
||||
ms.sourcegitcommit: 1309b46201604c190c63bfee47dce559003899bf
|
||||
ms.sourcegitcommit: 80842b4e4c500daa051eff0ccd7cde91c2d4bb36
|
||||
ms.translationtype: HT
|
||||
ms.contentlocale: ja-JP
|
||||
ms.lasthandoff: 09/10/2022
|
||||
ms.lasthandoff: 09/12/2022
|
||||
ms.locfileid: '146332457'
|
||||
---
|
||||
{% data reusables.github-connect.beta %}
|
||||
|
||||
@@ -13,16 +13,18 @@ topics:
|
||||
- Enterprise
|
||||
- Fundamentals
|
||||
- Infrastructure
|
||||
ms.openlocfilehash: 120827f8eca8061d90d397a7e2a21d46ae33f243
|
||||
ms.sourcegitcommit: dc42bb4a4826b414751ffa9eed38962c3e3fea8e
|
||||
ms.openlocfilehash: a12955707c3ebcfbb65e5be8053ea0b62bc82072
|
||||
ms.sourcegitcommit: 478f2931167988096ae6478a257f492ecaa11794
|
||||
ms.translationtype: HT
|
||||
ms.contentlocale: ja-JP
|
||||
ms.lasthandoff: 07/13/2022
|
||||
ms.locfileid: '146681318'
|
||||
ms.lasthandoff: 09/09/2022
|
||||
ms.locfileid: '147723233'
|
||||
---
|
||||
ハードコードされた IP アドレスの代わりにホスト名を設定すれば、ユーザーやクライアント ソフトウェアに影響を与えることなく {% data variables.product.product_location %}を動作させる物理ハードウェアを変更できるようになります。
|
||||
|
||||
{% data variables.enterprise.management_console %} のホスト名の設定は、適切な完全修飾ドメイン名 (FQDN) に設定して、インターネット上または内部ネットワーク内で解決できるようにしてください。 たとえば、ホスト名を `github.companyname.com.` に設定できます。Web と API のリクエストでは、{% data variables.enterprise.management_console %} で設定されたホスト名に自動的にリダイレクトされます。 `localhost` は有効なホスト名設定ではないことにご留意ください。
|
||||
{% data variables.enterprise.management_console %} のホスト名の設定は、適切な完全修飾ドメイン名 (FQDN) に設定して、インターネット上または内部ネットワーク内で解決できるようにしてください。 たとえば、ホスト名を `github.companyname.com.` に設定できます。Web と API のリクエストでは、{% data variables.enterprise.management_console %} で設定されたホスト名に自動的にリダイレクトされます。 `localhost` は有効なホスト名設定ではないことにご留意ください。
|
||||
|
||||
[ドメイン名仕様 RFC のセクション 2.3.4](https://datatracker.ietf.org/doc/html/rfc1035#section-2.3.4) に従って、ホスト名の長さは 63 文字未満にする必要があります。
|
||||
|
||||
ホスト名を設定したら、サブドメイン分離を有効化して、{% data variables.product.product_location %}のセキュリティをさらに強化できます。 詳細については、「[サブドメイン分離の有効化](/enterprise/admin/guides/installation/enabling-subdomain-isolation/)」を参照してください。
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
title: Configuring email for notifications
|
||||
intro: 'To make it easy for users to respond quickly to activity on {% data variables.product.product_name %}, you can configure {% data variables.product.product_location %} to send email notifications for issue, pull request, and commit comments.'
|
||||
title: 通知のためのメール設定
|
||||
intro: 'ユーザが {% data variables.product.product_name %} のアクティビティにすばやく応答できるようにするために、{% data variables.product.product_location %} を設定して、Issue、プルリクエスト、およびコミットコメントのメール通知を送信できます。'
|
||||
redirect_from:
|
||||
- /enterprise/admin/guides/installation/email-configuration
|
||||
- /enterprise/admin/articles/configuring-email
|
||||
@@ -18,109 +18,103 @@ topics:
|
||||
- Infrastructure
|
||||
- Notifications
|
||||
shortTitle: Configure email notifications
|
||||
ms.openlocfilehash: d7dd82fa95db462abe8d9d19e8df60a45dab3f0c
|
||||
ms.sourcegitcommit: 478f2931167988096ae6478a257f492ecaa11794
|
||||
ms.translationtype: HT
|
||||
ms.contentlocale: ja-JP
|
||||
ms.lasthandoff: 09/09/2022
|
||||
ms.locfileid: '147718134'
|
||||
---
|
||||
{% ifversion ghae %}
|
||||
Enterprise owners can configure email for notifications.
|
||||
{% ifversion ghae %} エンタープライズの所有者は、通知用のメールを設定できます。
|
||||
{% endif %}
|
||||
## Configuring SMTP for your enterprise
|
||||
## Enterprise 向けの SMTP を設定する
|
||||
|
||||
{% ifversion ghes %} {% data reusables.enterprise_site_admin_settings.email-settings %}
|
||||
4. **[メールを有効にする]** を選択します。 これでアウトバウンドとインバウンドのメールがどちらも有効化されますが、インバウンドのメールが動作するには、以下の「[着信メールを許可する DNS とファイアウォールの設定](#configuring-dns-and-firewall-settings-to-allow-incoming-emails)」に記述されているように DNS を設定する必要もあります。
|
||||

|
||||
5. SMTP サーバーの設定を入力します。
|
||||
- **[サーバー アドレス]** フィールドに SMTP サーバーのアドレスを入力します。
|
||||
- **[ポート]** フィールドに、SMTP サーバーがメールの送信に使用するポートを入力します。
|
||||
- **[ドメイン]** フィールドに、SMTP サーバーから HELO 応答が送信されるドメイン名 (存在する場合) を入力します。
|
||||
- **[認証]** ドロップダウンを選択し、SMTP サーバーで使用される暗号化の種類を選択します。
|
||||
- **[No-reply メール アドレス]** フィールドに、すべての通知メールの [送信元] フィールドと [宛先] フィールドに使用するメール アドレスを入力します。
|
||||
6. no-reply メール アドレスへの着信メールをすべて破棄したい場合には、 **[no-reply メール アドレスへのメールの破棄]** を選択してください。
|
||||

|
||||
7. **[サポート]** で、ユーザーに追加のサポートを提供するリンクの種類を選択します。
|
||||
- **[メール]:** 内部メール アドレス。
|
||||
- **[URL]:** 内部サポート サイトへのリンク。 `http://` または `https://` のいずれかを含める必要があります。
|
||||

|
||||
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 サーバーで使用される暗号化の種類を選択します。
|
||||
- **[No-reply メール アドレス]** フィールドに、すべての通知メールの [送信元] フィールドと [宛先] フィールドに使用するメール アドレスを入力します。
|
||||
4. no-reply メール アドレスへの着信メールをすべて破棄したい場合には、 **[no-reply メール アドレスへのメールの破棄]** を選択してください。
|
||||
![メール設定の [破棄] チェック ボックス](/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)."
|
||||

|
||||
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**.
|
||||

|
||||
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://`.
|
||||

|
||||
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**.
|
||||

|
||||
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**.
|
||||

|
||||
5. Click **Test email settings**.
|
||||

|
||||
6. Under "Send test email to," type the email address where you want to send a test email, then click **Send test email**.
|
||||

|
||||
7. Click **Save**.
|
||||

|
||||
{% endif %}
|
||||
## メール配信のテスト
|
||||
|
||||
{% ifversion ghes %}
|
||||
## Testing email delivery
|
||||
|
||||
1. At the top of the **Email** section, click **Test email settings**.
|
||||

|
||||
2. In the **Send test email to** field, type an address to send the test email to.
|
||||

|
||||
3. Click **Send test email**.
|
||||

|
||||
1. **[メール]** セクションの上部で、 **[メール設定のテスト]** をクリックします。
|
||||

|
||||
2. **[テスト メールの送信先]** フィールドに、テスト メールを送信するアドレスを入力します。
|
||||

|
||||
3. **[テスト メールの送信]** をクリックします。
|
||||

|
||||
|
||||
{% 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**.
|
||||

|
||||
{% 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.
|
||||
すべての受信 SMTP 接続に対して TLS 暗号化を適用できます。これは、ISO-27017 認定要件を満たすのに役立ちます。
|
||||
|
||||
{%- ifversion ghes = 3.6 %}
|
||||
{% note %}
|
||||
{%- ifversion ghes = 3.6 %} {% note %}
|
||||
|
||||
**Note**: Enforcement of TLS for SMTP connections is unavailable in {% data variables.product.product_name %} 3.6.0. The feature will be available in an upcoming release.
|
||||
**注**: {% data variables.product.product_name %} 3.6.0 では、SMTP 接続に対する TLS の適用は使用できません。 この機能は、今後のリリースで提供する予定です。
|
||||
|
||||
{% endnote %}
|
||||
{%- endif %}
|
||||
{% endnote %} {%- endif %}
|
||||
|
||||
{% data reusables.enterprise_site_admin_settings.email-settings %}
|
||||
1. Under "Authentication," select **Enforce TLS auth (recommended)**.
|
||||
1. [認証] で、 **[TLS 認証の強制 (推奨)]** を選びます。
|
||||
|
||||

|
||||
{% 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. インスタンスのポート25がSMTPサーバにアクセスできることを確認してください。
|
||||
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
|
||||
### 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:
|
||||
unicornログは以下のようなトランザクションになっているはずです。
|
||||
|
||||
```shell
|
||||
This is a test email generated from https://10.0.0.68/setup/settings
|
||||
@@ -152,18 +146,18 @@ TLS connection started
|
||||
-> "535 5.7.1 http://support.yourdomain.com/smtp/auth-not-accepted nt3sm2942435pbc.14\r\n"
|
||||
```
|
||||
|
||||
This log shows that the appliance:
|
||||
このログからは、アプライアンスについて以下のことが分かります。
|
||||
|
||||
* Opened a connection with the SMTP server (`Connection opened: smtp.yourdomain.com:587`).
|
||||
* Successfully made a connection and chose to use TLS (`TLS connection started`).
|
||||
* The `login` authentication type was performed (`<- "AUTH LOGIN\r\n"`).
|
||||
* The SMTP Server rejected the authentication as invalid (`-> "535-5.7.1 Username and Password not accepted.`).
|
||||
* SMTP サーバーとの接続をオープンしました (`Connection opened: smtp.yourdomain.com:587`)。
|
||||
* 接続に成功し、TLS の使用を選択しました (`TLS connection started`)。
|
||||
* `login` 認証の型が実行されました (`<- "AUTH LOGIN\r\n"`)。
|
||||
* SMTP サーバーが認証を無効として拒否しました (`-> "535-5.7.1 Username and Password not accepted.`)。
|
||||
|
||||
### Check {% data variables.product.product_location %} logs
|
||||
### {% data variables.product.product_location %} ログのチェック
|
||||
|
||||
If you need to verify that your inbound email is functioning, there are two log files that you can examine on your instance: To verify that */var/log/mail.log* and */var/log/mail-replies/metroplex.log*.
|
||||
インバウンドのメールが機能していることを検証する必要があるなら、インスタンスには調べることができる 2 つのログ ファイルがあります。 */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 +169,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* は、インバウンドのメールが issue や pull requet に返信として追加されるよう処理されているかどうかを示します。 以下は成功したメッセージの例です:
|
||||
|
||||
```
|
||||
[2014-10-30T00:47:23.306 INFO (5284) #] metroplex: processing <b2b9c260-4aaa-4a93-acbb-0b2ddda68579@me.com>
|
||||
@@ -185,19 +179,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.product.product_location %} is behind a firewall or is being served through an AWS Security Group, make sure port 25 is open to all mail servers that send emails to `reply@reply.[hostname]`.
|
||||
{% data variables.product.product_location %} がファイアウォールの背後にあったり、AWS のセキュリティ グループを通じて提供されていたりするなら、`reply@reply.[hostname]` にメールを送信するすべてのメール サーバーに対してポート 25 が開いていることを確かめてください。
|
||||
|
||||
### 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 %}SMTP サーバー経由で通知を送信するための電子メールの構成については、{% data variables.contact.github_support %} にお問い合わせください。 詳細については、「[{% data variables.contact.github_support %} からのヘルプの受信](/admin/enterprise-support/receiving-help-from-github-support)」を参照してください。
|
||||
{% endif %}
|
||||
|
||||
@@ -41,10 +41,10 @@ children:
|
||||
- /configuring-web-commit-signing
|
||||
shortTitle: Configure your enterprise
|
||||
ms.openlocfilehash: 3cc7deccfdf71a0e339fca8055f0cd4b5027a32c
|
||||
ms.sourcegitcommit: fb047f9450b41b24afc43d9512a5db2a2b750a2a
|
||||
ms.sourcegitcommit: 80842b4e4c500daa051eff0ccd7cde91c2d4bb36
|
||||
ms.translationtype: HT
|
||||
ms.contentlocale: ja-JP
|
||||
ms.lasthandoff: 09/11/2022
|
||||
ms.lasthandoff: 09/12/2022
|
||||
ms.locfileid: '147409240'
|
||||
---
|
||||
|
||||
|
||||
@@ -20,11 +20,11 @@ topics:
|
||||
- Troubleshooting
|
||||
shortTitle: Troubleshoot TLS errors
|
||||
ms.openlocfilehash: 855737f89f0380333b1f37c26d512c889f2ee786
|
||||
ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5
|
||||
ms.sourcegitcommit: fb047f9450b41b24afc43d9512a5db2a2b750a2a
|
||||
ms.translationtype: HT
|
||||
ms.contentlocale: ja-JP
|
||||
ms.lasthandoff: 09/05/2022
|
||||
ms.locfileid: '147389402'
|
||||
ms.lasthandoff: 09/11/2022
|
||||
ms.locfileid: '147881252'
|
||||
---
|
||||
## 鍵ファイルからのパスフレーズの除去
|
||||
|
||||
|
||||
@@ -15,10 +15,10 @@ children:
|
||||
- /caching-repositories
|
||||
shortTitle: 'Monitor, manage, and update your appliance'
|
||||
ms.openlocfilehash: 1d2a9dfb22d8243617ba5844df93e5bfcaf6d99d
|
||||
ms.sourcegitcommit: fcf3546b7cc208155fb8acdf68b81be28afc3d2d
|
||||
ms.sourcegitcommit: 5f9527483381cfb1e41f2322f67c80554750a47d
|
||||
ms.translationtype: HT
|
||||
ms.contentlocale: ja-JP
|
||||
ms.lasthandoff: 09/10/2022
|
||||
ms.locfileid: '145120526'
|
||||
ms.lasthandoff: 09/11/2022
|
||||
ms.locfileid: '147882740'
|
||||
---
|
||||
|
||||
|
||||
@@ -15,11 +15,11 @@ topics:
|
||||
- Storage
|
||||
shortTitle: Increase storage capacity
|
||||
ms.openlocfilehash: b6542e1f43ce4111358de3940c8e46dea2afd5d5
|
||||
ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5
|
||||
ms.sourcegitcommit: fcf3546b7cc208155fb8acdf68b81be28afc3d2d
|
||||
ms.translationtype: HT
|
||||
ms.contentlocale: ja-JP
|
||||
ms.lasthandoff: 09/05/2022
|
||||
ms.locfileid: '147065393'
|
||||
ms.lasthandoff: 09/11/2022
|
||||
ms.locfileid: '147881123'
|
||||
---
|
||||
{% data reusables.enterprise_installation.warning-on-upgrading-physical-resources %}
|
||||
|
||||
|
||||
@@ -14,10 +14,10 @@ redirect_from:
|
||||
- /admin/github-actions/enabling-github-actions-with-azure-blob-storage
|
||||
shortTitle: Azure Blob storage
|
||||
ms.openlocfilehash: bcd92b12ec8ecd807906a3b2f7c09971d6641b93
|
||||
ms.sourcegitcommit: fcf3546b7cc208155fb8acdf68b81be28afc3d2d
|
||||
ms.sourcegitcommit: 76b840f45ba85fb79a7f0c1eb43bc663b3eadf2b
|
||||
ms.translationtype: HT
|
||||
ms.contentlocale: ja-JP
|
||||
ms.lasthandoff: 09/10/2022
|
||||
ms.lasthandoff: 09/12/2022
|
||||
ms.locfileid: '145120453'
|
||||
---
|
||||
## 前提条件
|
||||
|
||||
@@ -22,10 +22,10 @@ children:
|
||||
- /using-enterprise-managed-users-for-iam
|
||||
- /managing-recovery-codes-for-your-enterprise
|
||||
ms.openlocfilehash: 8c7a364ba6310617452626901c5859ef54cd2b47
|
||||
ms.sourcegitcommit: 1309b46201604c190c63bfee47dce559003899bf
|
||||
ms.sourcegitcommit: 5f9527483381cfb1e41f2322f67c80554750a47d
|
||||
ms.translationtype: HT
|
||||
ms.contentlocale: ja-JP
|
||||
ms.lasthandoff: 09/10/2022
|
||||
ms.locfileid: '147066482'
|
||||
ms.lasthandoff: 09/11/2022
|
||||
ms.locfileid: '147882812'
|
||||
---
|
||||
|
||||
|
||||
@@ -17,11 +17,11 @@ topics:
|
||||
- Identity
|
||||
shortTitle: Change authentication methods
|
||||
ms.openlocfilehash: 074c4fe8784d3ea7b8ada6b532e680384571facf
|
||||
ms.sourcegitcommit: fcf3546b7cc208155fb8acdf68b81be28afc3d2d
|
||||
ms.sourcegitcommit: 5f9527483381cfb1e41f2322f67c80554750a47d
|
||||
ms.translationtype: HT
|
||||
ms.contentlocale: ja-JP
|
||||
ms.lasthandoff: 09/10/2022
|
||||
ms.locfileid: '145120365'
|
||||
ms.lasthandoff: 09/11/2022
|
||||
ms.locfileid: '147882692'
|
||||
---
|
||||
{% data variables.product.product_location %} のユーザー アカウントは、認証方式を変更しても保存され、ユーザーはユーザー名が変更されない限り、同じアカウントにログインし続けることができます。
|
||||
|
||||
|
||||
@@ -19,11 +19,11 @@ topics:
|
||||
- Identity
|
||||
- SSO
|
||||
ms.openlocfilehash: 4bd9c8baf32ab09c593a251ca4f1cb698e075501
|
||||
ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5
|
||||
ms.sourcegitcommit: 5f9527483381cfb1e41f2322f67c80554750a47d
|
||||
ms.translationtype: HT
|
||||
ms.contentlocale: ja-JP
|
||||
ms.lasthandoff: 09/05/2022
|
||||
ms.locfileid: '145112670'
|
||||
ms.lasthandoff: 09/11/2022
|
||||
ms.locfileid: '147884278'
|
||||
---
|
||||
## {% data variables.product.product_name %} の CAS 認証について
|
||||
|
||||
|
||||
@@ -14,11 +14,11 @@ topics:
|
||||
- Accounts
|
||||
- Enterprise
|
||||
ms.openlocfilehash: 3ce59680c100004496e761d2a93adc9e9cae0a22
|
||||
ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5
|
||||
ms.sourcegitcommit: fb047f9450b41b24afc43d9512a5db2a2b750a2a
|
||||
ms.translationtype: HT
|
||||
ms.contentlocale: ja-JP
|
||||
ms.lasthandoff: 09/05/2022
|
||||
ms.locfileid: '146689078'
|
||||
ms.lasthandoff: 09/11/2022
|
||||
ms.locfileid: '147881498'
|
||||
---
|
||||
## {% data variables.product.prodname_emus %} のプロビジョニングについて
|
||||
|
||||
|
||||
@@ -134,10 +134,10 @@ children:
|
||||
- /release-notes
|
||||
- /all-releases
|
||||
ms.openlocfilehash: ebd1473538d42928ff3d9abb3c0e2bd9f12767f5
|
||||
ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5
|
||||
ms.sourcegitcommit: fb047f9450b41b24afc43d9512a5db2a2b750a2a
|
||||
ms.translationtype: HT
|
||||
ms.contentlocale: ja-JP
|
||||
ms.lasthandoff: 09/05/2022
|
||||
ms.locfileid: '146454174'
|
||||
ms.lasthandoff: 09/11/2022
|
||||
ms.locfileid: '147881156'
|
||||
---
|
||||
|
||||
|
||||
@@ -22,10 +22,10 @@ children:
|
||||
- /setting-up-a-staging-instance
|
||||
shortTitle: Set up an instance
|
||||
ms.openlocfilehash: 23fe586f2c4baa87a2e2b388685bf8e42d5e10a4
|
||||
ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5
|
||||
ms.sourcegitcommit: fb047f9450b41b24afc43d9512a5db2a2b750a2a
|
||||
ms.translationtype: HT
|
||||
ms.contentlocale: ja-JP
|
||||
ms.lasthandoff: 09/05/2022
|
||||
ms.locfileid: '145116533'
|
||||
ms.lasthandoff: 09/11/2022
|
||||
ms.locfileid: '147881462'
|
||||
---
|
||||
|
||||
|
||||
@@ -15,11 +15,11 @@ topics:
|
||||
- Set up
|
||||
shortTitle: Install on OpenStack
|
||||
ms.openlocfilehash: 105201d2759b333d297278aa7fe32a9544c68839
|
||||
ms.sourcegitcommit: fb047f9450b41b24afc43d9512a5db2a2b750a2a
|
||||
ms.sourcegitcommit: fcf3546b7cc208155fb8acdf68b81be28afc3d2d
|
||||
ms.translationtype: HT
|
||||
ms.contentlocale: ja-JP
|
||||
ms.lasthandoff: 09/11/2022
|
||||
ms.locfileid: '145115229'
|
||||
ms.locfileid: '147884956'
|
||||
---
|
||||
## 前提条件
|
||||
|
||||
|
||||
@@ -9,10 +9,10 @@ children:
|
||||
- /exporting-server-statistics
|
||||
- /requesting-server-statistics-using-the-rest-api
|
||||
ms.openlocfilehash: 76f0e75b3d496800368a2dca38f613ba750924bc
|
||||
ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5
|
||||
ms.sourcegitcommit: 5f9527483381cfb1e41f2322f67c80554750a47d
|
||||
ms.translationtype: HT
|
||||
ms.contentlocale: ja-JP
|
||||
ms.lasthandoff: 09/05/2022
|
||||
ms.locfileid: '147065907'
|
||||
ms.lasthandoff: 09/11/2022
|
||||
ms.locfileid: '147884182'
|
||||
---
|
||||
|
||||
|
||||
@@ -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: Enterprise の監査ログのストリーミング
|
||||
intro: '監査イベントと Git イベントのデータを {% data variables.product.prodname_dotcom %} から外部のデータ管理システムにストリーミングできます。'
|
||||
miniTocMaxHeadingLevel: 3
|
||||
versions:
|
||||
feature: audit-log-streaming
|
||||
@@ -15,32 +15,34 @@ 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: 81eb88f760016390a321798589e7994542c9f312
|
||||
ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5
|
||||
ms.translationtype: HT
|
||||
ms.contentlocale: ja-JP
|
||||
ms.lasthandoff: 09/05/2022
|
||||
ms.locfileid: '147710340'
|
||||
---
|
||||
{% ifversion ghes %} {% note %}
|
||||
|
||||
{% ifversion ghes %}
|
||||
{% note %}
|
||||
**注:** {% data variables.product.product_name %} の監査ログ ストリーミングは現在、ベータ版であり、変更される可能性があります。
|
||||
|
||||
**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:
|
||||
* **データの探索**。 大量のデータに対してクエリを実行するために、推奨されるツールを使用して、ストリーミングされたイベントを調べることができます。 ストリーミングには、Enterprise アカウント全体の監査イベントと Git イベントの両方が含まれます。{% ifversion pause-audit-log-stream %}
|
||||
* **データの継続性**。 ストリーミングは、最長 7 日間、監査データを失うことなく一時停止できます。{% 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.
|
||||
Enterprise 所有者は、ストリームをいつでも設定{% ifversion pause-audit-log-stream %}、一時停止、{% endif %}または削除することができます。 ストリーミングによって、Enterprise 内のすべての Organization に関する監査と 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)
|
||||
@@ -49,55 +51,52 @@ You set up the audit log stream on {% data variables.product.product_name %} by
|
||||
- [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 バケットの作成、設定、操作](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 ドキュメントの「[Understanding and getting your AWS credentials](https://docs.aws.amazon.com/general/latest/gr/aws-sec-cred-types.html)」 (AWS 資格情報の理解と取得) を参照してください。
|
||||
|
||||
{% 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. [認証] で **[アクセス キー]** をクリックします。
|
||||
|
||||
{% endif %}
|
||||
1. Configure the stream settings.
|
||||
{% 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 %}
|
||||
- [バケット] に、ストリーミング先のバケットの名前を入力します。 たとえば、`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 へのストリーミングを設定する
|
||||
|
||||
{% note %}
|
||||
|
||||
**Note:** Streaming to Amazon S3 with OpenID Connect is currently in beta and subject to change.
|
||||
**注:** OpenID Connect を使った Amazon S3 へのストリーミングは、現在ベータ版であり、変更される可能性があります。
|
||||
|
||||
{% endnote %}
|
||||
|
||||
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.
|
||||
1. AWS では、{% data variables.product.prodname_dotcom %} の OIDC プロバイダーを IAM に追加します。 詳しくは、AWS のドキュメント「[OpenID Connect (OIDC) ID プロバイダーの作成](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_create_oidc.html)」をご覧ください。
|
||||
|
||||
- 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. {% data variables.product.prodname_dotcom %} requires only the following permissions.
|
||||
- プロバイダーの URL には、`https://oidc-configuration.audit-log.githubusercontent.com` を使います。
|
||||
- [対象者] には、`sts.amazonaws.com` を使います。
|
||||
1. バケットを作成し、バケットへのパブリック アクセスをブロックします。 詳しくは、AWS のドキュメント「[Amazon S3 バケットの作成、設定、操作](https://docs.aws.amazon.com/AmazonS3/latest/userguide/creating-buckets-s3.html)」をご覧ください。
|
||||
1. {% data variables.product.company_short %} によるバケットへの書き込みを許可するポリシーを作成します。 {% data variables.product.prodname_dotcom %} には、次のアクセス許可のみが必要です。
|
||||
|
||||
```
|
||||
{
|
||||
@@ -114,11 +113,11 @@ For information on creating or accessing your access key ID and secret key, see
|
||||
]
|
||||
}
|
||||
```
|
||||
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 のドキュメント「[IAM ポリシーの作成](https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_create.html)」をご覧ください。
|
||||
1. {% data variables.product.prodname_dotcom %} IdP のロールと信頼ポリシーを構成します。 詳しくは、AWS のドキュメント「[ウェブ ID または OpenID Connect フェデレーション用のロールを作成する (コンソール)](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_create_for-idp_oidc.html)」をご覧ください。
|
||||
|
||||
- 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.
|
||||
- 上で作成したアクセス許可ポリシーを追加して、バケットへの書き込みを許可します。
|
||||
- 信頼関係を編集して、`sub` フィールドを検証条件に追加し、`ENTERPRISE` を自分の Enterprise の名前に置き換えます。
|
||||
```
|
||||
"Condition": {
|
||||
"StringEquals": {
|
||||
@@ -127,217 +126,209 @@ 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 Resource Name (ARN) を記録しておきます。
|
||||
{% data reusables.enterprise.navigate-to-log-streaming-tab %} {% data reusables.audit_log.streaming-choose-s3 %}
|
||||
1. [認証] の **[OpenID Connect]** をクリックします。
|
||||
|
||||

|
||||
1. Configure the stream settings.
|
||||

|
||||
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 %}
|
||||
- [バケット] に、ストリーミング先のバケットの名前を入力します。 たとえば、`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 のセキュリティ脆弱性を検出したなど、何らかの理由で OIDC を使用した S3 へのストリーミングを無効にする場合は、ストリーミングの設定時に AWS で作成した {% data variables.product.prodname_dotcom %} OIDC プロバイダーを削除します。 詳しくは、AWS のドキュメント「[OpenID Connect (OIDC) ID プロバイダーの作成](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_create_oidc.html)」をご覧ください。
|
||||
|
||||
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 Storage の概要](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 portal** で次の操作を行います。
|
||||
1. [ホーム] ページで、 **[ストレージ アカウント]** をクリックします。
|
||||
2. 使用するストレージ アカウントの名前をクリックし、 **[コンテナー]** をクリックします。
|
||||
|
||||

|
||||
![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. **[共有アクセス トークン]** をクリックします。
|
||||
|
||||

|
||||
![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` のみを許可するようにアクセス許可を変更します。
|
||||
|
||||

|
||||
![[アクセス許可] ドロップダウン メニュー](/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** フィールドの値をコピーします。 この URL を {% data variables.product.prodname_dotcom %} で使用します。
|
||||
|
||||
**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. **[Configure stream]** をクリックし、 **[Azure Blob Storage]** を選択します。
|
||||
|
||||

|
||||
![ドロップダウン メニューから [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 を入力します。 **[Container]** フィールドは、その URL に基づいて自動入力されます。
|
||||
|
||||

|
||||

|
||||
|
||||
1. Click **Check endpoint** to verify that {% data variables.product.prodname_dotcom %} can connect and write to the Azure Blob Storage endpoint.
|
||||
1. **[Check endpoint]** をクリックして、{% data variables.product.prodname_dotcom %} で Azure Blob Storage エンドポイントに接続して書き込むことができることを確認します。
|
||||
|
||||

|
||||

|
||||
|
||||
{% data reusables.enterprise.verify-audit-log-streaming-endpoint %}
|
||||
|
||||
### Setting up streaming to Azure Event Hubs
|
||||
### Azure Event Hubs へのストリーミングの設定
|
||||
|
||||
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 portal を使用したイベント ハブの作成](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.
|
||||
イベント ハブに関する 2 つの情報 (インスタント名と接続文字列) が必要です。
|
||||
|
||||
**On Microsoft Azure portal**:
|
||||
1. Search for "Event Hubs".
|
||||
**Microsoft Azure portal** で次の操作を行います。
|
||||
1. 「Event Hubs」を検索します。
|
||||
|
||||

|
||||

|
||||
|
||||
1. Select **Event Hubs**. The names of your event hubs are listed.
|
||||
1. **[Event Hubs]** を選択します。 イベント ハブの名前が一覧表示されます。
|
||||
|
||||

|
||||

|
||||
|
||||
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. ポリシーの一覧で共有アクセス ポリシーを選択するか、新しいポリシーを作成します。
|
||||
|
||||

|
||||

|
||||
|
||||
1. Click the button to the right of the **Connection string-primary key** field to copy the connection string.
|
||||
1. **[接続文字列 – 主キー]** フィールドの右側にあるボタンをクリックして、接続文字列をコピーします。
|
||||
|
||||

|
||||

|
||||
|
||||
**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. **[Configure stream]** をクリックし、 **[Azure Event Hubs]** を選択します。
|
||||
|
||||

|
||||
![ドロップダウン メニューから [Azure Events Hubs] を選択する](/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 インスタンスの名前。
|
||||
* 接続文字列。
|
||||
|
||||

|
||||

|
||||
|
||||
1. Click **Check endpoint** to verify that {% data variables.product.prodname_dotcom %} can connect and write to the Azure Events Hub endpoint.
|
||||
1. **[Check endpoint]** をクリックして、{% data variables.product.prodname_dotcom %} で Azure Events Hubs エンドポイントに接続して書き込むことができることを確認します。
|
||||
|
||||

|
||||

|
||||
|
||||
{% data reusables.enterprise.verify-audit-log-streaming-endpoint %}
|
||||
|
||||
{% ifversion streaming-datadog %}
|
||||
### Setting up streaming to Datadog
|
||||
### Datadog へのストリーミングの設定
|
||||
|
||||
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.
|
||||
Datadog へのストリーミングを設定するには、Datadog でクライアント トークンまたは API キーを作成し、次に認証用のトークンを使用して {% data variables.product.product_name %} で監査ログ ストリーミングを構成する必要があります。 Datadog でバケットやその他のストレージ コンテナーを作成する必要はありません。
|
||||
|
||||
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/).
|
||||
Datadog へのストリーミングを設定した後は、"github.audit.streaming" でフィルター処理することで自分の監査ログ データを確認できます。 詳しくは、「[ログ管理](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.
|
||||
{% data reusables.enterprise.navigate-to-log-streaming-tab %}
|
||||
1. Select the **Configure stream** dropdown menu and click **Datadog**.
|
||||
1. まだ Datadog アカウントがない場合は、それを作成します。
|
||||
1. Datadog で、クライアント トークンまたは API キーを生成して、 **[キーのコピー]** をクリックします。 詳しくは、Datadog Docs の「[API キーとアプリケーション キー](https://docs.datadoghq.com/account_management/api-app-keys/)」を参照してください。 {% data reusables.enterprise.navigate-to-log-streaming-tab %}
|
||||
1. **[ストリームの構成]** ドロップダウンを選び、 **[Datadog]** をクリックします。
|
||||
|
||||

|
||||
1. Under "Token", paste the token you copied earlier.
|
||||
![[Datadog] が強調表示された [ストリームの構成] ドロップダウン メニューのスクリーンショット](/assets/images/help/enterprises/audit-stream-choice-datadog.png)
|
||||
1. [トークン] の下に、先ほどコピーしたトークンを貼り付けます。
|
||||
|
||||

|
||||
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-datadog-token.png)
|
||||
1. [サイト] ドロップダウン メニューを選び、Datadog サイトをクリックします。 ご利用の Datadog サイトを特定するには、その Datadog の URL を Datadog Docs にある [Datadog サイト](https://docs.datadoghq.com/getting_started/site/) 内のテーブルと比較します。
|
||||
|
||||

|
||||
1. To verify that {% data variables.product.prodname_dotcom %} can connect and write to the Datadog endpoint, click **Check endpoint**.
|
||||
![[サイト] ドロップダウン メニューのスクリーンショット](/assets/images/help/enterprises/audit-stream-datadog-site.png)
|
||||
1. {% data variables.product.prodname_dotcom %} で Datadog エンドポイントに接続して書き込みができることを確認するには、 **[エンドポイントのチェック]** をクリックします。
|
||||
|
||||

|
||||
{% 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 %}.
|
||||
 {% data reusables.enterprise.verify-audit-log-streaming-endpoint %}
|
||||
1. 数分後、Datadog の **[ログ]** タブに監査ログ データが表示されていることを確認します。 監査ログ データが表示されない場合は、トークンとサイトが正しいことを {% data variables.product.prodname_dotcom %} で確認します。
|
||||
{% endif %}
|
||||
|
||||
### Setting up streaming to Google Cloud Storage
|
||||
### Google Cloud Storage へのストリーミングの設定
|
||||
|
||||
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.
|
||||
Google Cloud Storage へのストリーミングを設定するには、適切な資格情報とアクセス許可を使用して、Google Cloud にサービス アカウントを作成し、そのサービス アカウントの資格情報を認証に使用して {% data variables.product.product_name %} での監査ログのストリーミングを構成します。
|
||||
|
||||
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.
|
||||
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 のドキュメント「[ストレージ バケットの作成](https://cloud.google.com/storage/docs/creating-buckets)」を参照してください。
|
||||
1. バケットのストレージ オブジェクト作成者のロールをサービス アカウントに付与します。 詳細については、Google 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 drop-down menu and click **Google Cloud Storage**.
|
||||
1. [Configure stream] ドロップダウン メニューを選択し、 **[Google Cloud Storage]** をクリックします。
|
||||
|
||||

|
||||
![[Configure stream] ドロップダウン メニューのスクリーンショット](/assets/images/help/enterprises/audit-stream-choice-google-cloud-storage.png)
|
||||
|
||||
1. Under "Bucket", type the name of your Google Cloud Storage bucket.
|
||||
1. [Bucket] で、Google Cloud Storage バケットの名前を入力します。
|
||||
|
||||

|
||||
![[Bucket] テキスト フィールドのスクリーンショット](/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.
|
||||
1. [JSON Credentials] で、サービス アカウントの JSON キーのファイルの内容全体を貼り付けます。
|
||||
|
||||

|
||||
![[JSON Credentials] テキスト フィールドのスクリーンショット](/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**.
|
||||
1. {% data variables.product.prodname_dotcom %} で Google Cloud Storage バケットに接続して書き込めることを確認するには、 **[Check endpoint]** をクリックします。
|
||||
|
||||

|
||||
![[Check endpoint] ボタンのスクリーンショット](/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 Event Collector (HEC) エンドポイントにストリーミングするには、エンドポイントが HTTPS 接続を受け入れるように構成されていることを確認する必要があります。 詳細については、Splunk のドキュメント「[Set up and use HTTP Event Collector in Splunk Web](https://docs.splunk.com/Documentation/Splunk/latest/Data/UsetheHTTPEventCollector)」 (Splunk Web で HTTP Event Collector を設定および作成する) を参照してください。
|
||||
|
||||
{% data reusables.enterprise.navigate-to-log-streaming-tab %}
|
||||
1. Click **Configure stream** and select **Splunk**.
|
||||
1. **[Configure stream]** をクリックし、 **[Splunk]** を選択します。
|
||||
|
||||

|
||||
![ドロップダウン メニューから [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-<host>`, where `host` is the domain you use in Splunk Cloud. For example: `http-inputs-mycompany.splunkcloud.com`.
|
||||
Splunk Cloud を使用している場合、`Domain` は `http-inputs-<host>` である必要があります。ここで、`host` は、Splunk Cloud で使用するドメインです。 (例: `http-inputs-mycompany.splunkcloud.com`)。
|
||||
|
||||
* The port on which the application accepts data.<br>
|
||||
* アプリケーションでデータを受け入れるポート。<br>
|
||||
|
||||
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 %} でサードパーティ アプリケーションに対する認証に使用できるトークン。
|
||||
|
||||

|
||||

|
||||
|
||||
1. Leave the **Enable SSL verification** check box selected.
|
||||
1. **[Enable SSL verification]** チェック ボックスはオンのままにします。
|
||||
|
||||
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.
|
||||

|
||||
{% data reusables.enterprise.verify-audit-log-streaming-endpoint %}
|
||||
監査ログは常に、暗号化されたデータとしてストリーミングされます。ただし、このオプションを選択すると、{% data variables.product.prodname_dotcom %} によって、イベントの配信前に Splunk インスタンスの SSL 証明書が検証されます。 SSL 検証は、イベントが URL エンドポイントに安全に配信されることを保証するために役立ちます。 このオプションの選択をオフにすることはできますが、SSL 検証を有効のままにすることをお勧めします。
|
||||
1. **[Check endpoint]** をクリックして、{% data variables.product.prodname_dotcom %} で Splunk エンドポイントに接続して書き込むことができることを確認します。
|
||||
 {% 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.product.product_location %} and are then exported when you unpause the stream.
|
||||
ストリーミングを一時停止すると、監査ログ データを失うことなく、受信側のアプリケーションでメンテナンスを実行できます。 監査ログは、最長 7 日間 {% data variables.product.product_location %} に格納され、ストリーミングの一時停止を解除するとエクスポートされます。
|
||||
|
||||
{% 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.
|
||||
{% ifversion streaming-datadog %} Datadog で受け入れるログは過去 18 時間以降のものに限られます。 Datadog エンドポイントへのストリームを 18 時間以上一時停止した場合、ストリーミングを再開した後に Datadog で受け入れられないログが失われるリスクがあります。
|
||||
{% endif %}
|
||||
|
||||
{% data reusables.enterprise.navigate-to-log-streaming-tab %}
|
||||
1. Click **Pause stream**.
|
||||
1. **[Pause stream]** をクリックします。
|
||||
|
||||

|
||||

|
||||
|
||||
1. A confirmation message is displayed. Click **Pause stream** to confirm.
|
||||
1. 確認メッセージが表示されます。 **[Pause stream]** をクリックして確定します。
|
||||
|
||||
When the application is ready to receive audit logs again, click **Resume stream** to restart streaming audit logs.
|
||||
アプリケーションが、監査ログを再び受信できるようになったら、 **[Resume stream]** をクリックして監査ログのストリーミングを再開します。
|
||||
{% endif %}
|
||||
|
||||
## Deleting the audit log stream
|
||||
## 監査ログのストリーミングの削除
|
||||
|
||||
{% data reusables.enterprise.navigate-to-log-streaming-tab %}
|
||||
1. Click **Delete stream**.
|
||||
1. **[Delete stream]** をクリックします。
|
||||
|
||||

|
||||

|
||||
|
||||
1. A confirmation message is displayed. Click **Delete stream** to confirm.
|
||||
1. 確認メッセージが表示されます。 **[Delete stream]** をクリックして確定します。
|
||||
|
||||
@@ -15,10 +15,10 @@ topics:
|
||||
- Enterprise
|
||||
shortTitle: GitHub Enterprise API
|
||||
ms.openlocfilehash: d7228182a2dbccc856cb4030a3b08d1883eb266b
|
||||
ms.sourcegitcommit: fcf3546b7cc208155fb8acdf68b81be28afc3d2d
|
||||
ms.sourcegitcommit: 76b840f45ba85fb79a7f0c1eb43bc663b3eadf2b
|
||||
ms.translationtype: HT
|
||||
ms.contentlocale: ja-JP
|
||||
ms.lasthandoff: 09/11/2022
|
||||
ms.lasthandoff: 09/12/2022
|
||||
ms.locfileid: '146331633'
|
||||
---
|
||||
API を使用すると、さまざまなタスクを自動化できます。 次に例をいくつか示します。
|
||||
|
||||
@@ -0,0 +1,70 @@
|
||||
---
|
||||
title: エンタープライズ内でプロジェクトにポリシーを適用する
|
||||
intro: 'エンタープライズの Organization 内で{% data variables.projects.projects_v2_and_v1 %}にポリシーを適用したり、各 Organization でポリシーの設定を許可することができます。'
|
||||
permissions: Enterprise owners can enforce policies for projects 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
|
||||
- /admin/policies/enforcing-policies-for-your-enterprise/enforcing-project-board-policies-in-your-enterprise
|
||||
versions:
|
||||
ghec: '*'
|
||||
ghes: '*'
|
||||
ghae: '*'
|
||||
type: how_to
|
||||
topics:
|
||||
- Enterprise
|
||||
- Policies
|
||||
- Projects
|
||||
shortTitle: Project board policies
|
||||
ms.openlocfilehash: 2066ab3fd36814150ff79457930d05909027513e
|
||||
ms.sourcegitcommit: 478f2931167988096ae6478a257f492ecaa11794
|
||||
ms.translationtype: HT
|
||||
ms.contentlocale: ja-JP
|
||||
ms.lasthandoff: 09/09/2022
|
||||
ms.locfileid: '147854136'
|
||||
---
|
||||
## エンタープライズ内のプロジェクトのポリシーについて
|
||||
|
||||
エンタープライズ メンバーが{% data variables.projects.projects_v2_and_v1 %}を管理する方法を制御するポリシーを適用したり、Organization の所有者が Organization レベルで{% data variables.projects.projects_v2_and_v1 %}のポリシーを管理することを許可できます。{% ifversion project-visibility-policy %}
|
||||
|
||||
一部のポリシーは、新しいエクスペリエンスである{% data variables.product.prodname_projects_v2 %}と以前のエクスペリエンスである{% data variables.product.prodname_projects_v1 %} の両方に適用されますが、一部は{% data variables.product.prodname_projects_v1 %} にのみ適用されます。 各エクスペリエンスについて詳しくは、「[{% data variables.product.prodname_projects_v2 %}について](/issues/planning-and-tracking-with-projects/learning-about-projects/about-projects)」と「[{% data variables.product.prodname_projects_v1 %}について](/issues/organizing-your-work-with-project-boards/managing-project-boards/about-project-boards)」を参照してください。
|
||||
{% else %}詳しくは、[プロジェクト ボード](/issues/organizing-your-work-with-project-boards/managing-project-boards/about-project-boards)に関する説明を参照してください。{% endif %}
|
||||
|
||||
## Organization 全体のプロジェクトにポリシーを施行する
|
||||
|
||||
自分の企業で所有しているすべての Organization にわたって、Organization 全体のプロジェクト ボードを有効または無効にしたり、オーナーに Organization レベルで設定を管理させたりすることができます。
|
||||
|
||||
{% 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] で、ドロップダウンメニューを使用してポリシーを選択します。
|
||||

|
||||
|
||||
{% ifversion project-visibility-policy %}
|
||||
## プロジェクトの可視性の変更に関するポリシーを施行する
|
||||
|
||||
エンタープライズが所有するすべての Organization で、プロジェクトに対する管理者アクセスを持つユーザーがプロジェクトの可視性を変更できるようにしたり、所有者が Organization レベルで設定を管理できるようにすることができます。
|
||||
|
||||
{% data reusables.enterprise-accounts.access-enterprise %} {% data reusables.enterprise-accounts.policies-tab %} {% data reusables.enterprise-accounts.projects-tab %}
|
||||
1. [プロジェクトの可視性を変更する権限] に下で、設定の変更についての情報を確認してください。 {% data reusables.enterprise-accounts.view-current-policy-config-orgs %}
|
||||
1. ドロップダウン メニューを選択し、ポリシーをクリックします。
|
||||
|
||||
 {% endif %}
|
||||
|
||||
{% ifversion projects-v1 %}
|
||||
## {% data variables.product.prodname_projects_v1 %} にポリシーを施行する
|
||||
|
||||
一部のポリシーは、{% data variables.product.prodname_projects_v1 %} にしか適用されません。
|
||||
|
||||
### リポジトリのプロジェクトにポリシーを施行する
|
||||
|
||||
自分のエンタープライズで所有しているすべての Organization にわたって、リポジトリレベルのプロジェクトを有効または無効にしたり、所有者に Organization レベルでの設定の管理を許可することができます。
|
||||
|
||||
{% 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] で、ドロップダウンメニューを使用してポリシーを選択します。
|
||||
|
||||
 {% endif %}
|
||||
@@ -21,7 +21,7 @@ ms.sourcegitcommit: 5f9527483381cfb1e41f2322f67c80554750a47d
|
||||
ms.translationtype: HT
|
||||
ms.contentlocale: ja-JP
|
||||
ms.lasthandoff: 09/11/2022
|
||||
ms.locfileid: '145115190'
|
||||
ms.locfileid: '147884254'
|
||||
---
|
||||
各 Team には、[Organization が所有するリポジトリに対する個別に定義されたアクセス許可があります](/articles/permission-levels-for-an-organization)。
|
||||
|
||||
|
||||
@@ -34,10 +34,10 @@ children:
|
||||
- /continuous-integration-using-jenkins
|
||||
shortTitle: Manage organizations
|
||||
ms.openlocfilehash: 5d1430bc4efff03e6cddfe81f3c018d4f2064155
|
||||
ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5
|
||||
ms.sourcegitcommit: 5f9527483381cfb1e41f2322f67c80554750a47d
|
||||
ms.translationtype: HT
|
||||
ms.contentlocale: ja-JP
|
||||
ms.lasthandoff: 09/05/2022
|
||||
ms.locfileid: '147400332'
|
||||
ms.lasthandoff: 09/11/2022
|
||||
ms.locfileid: '147884246'
|
||||
---
|
||||
|
||||
|
||||
@@ -11,11 +11,11 @@ topics:
|
||||
- Organizations
|
||||
shortTitle: Manage your organization roles
|
||||
ms.openlocfilehash: e7a95602fe103dcbccb80bc2dfec6a67f8b4b312
|
||||
ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5
|
||||
ms.sourcegitcommit: 5f9527483381cfb1e41f2322f67c80554750a47d
|
||||
ms.translationtype: HT
|
||||
ms.contentlocale: ja-JP
|
||||
ms.lasthandoff: 09/05/2022
|
||||
ms.locfileid: '147065179'
|
||||
ms.lasthandoff: 09/11/2022
|
||||
ms.locfileid: '147884238'
|
||||
---
|
||||
## ロールの管理について
|
||||
|
||||
|
||||
@@ -11,12 +11,12 @@ versions:
|
||||
topics:
|
||||
- SSO
|
||||
shortTitle: SSH Key with SAML
|
||||
ms.openlocfilehash: 11df62f1a4adc5a0de1f54efbccafe71ad0feb83
|
||||
ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5
|
||||
ms.openlocfilehash: f4b11c123c01d56263de883cbdd0f87c48eee04b
|
||||
ms.sourcegitcommit: 478f2931167988096ae6478a257f492ecaa11794
|
||||
ms.translationtype: HT
|
||||
ms.contentlocale: ja-JP
|
||||
ms.lasthandoff: 09/05/2022
|
||||
ms.locfileid: '145120038'
|
||||
ms.lasthandoff: 09/09/2022
|
||||
ms.locfileid: '147854284'
|
||||
---
|
||||
既存の SSH キーを認可することも、新しい SSH キーを作成して認可することもできます。 新しい SSH キーの作成の詳細については、「[新しい SSH キーを生成して ssh-agent に追加する](/articles/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent)」を参照してください。
|
||||
|
||||
@@ -31,11 +31,12 @@ ms.locfileid: '145120038'
|
||||
{% endnote %}
|
||||
|
||||
{% data reusables.user-settings.access_settings %} {% data reusables.user-settings.ssh %}
|
||||
3. 承認する SSH キーの横にある **[SSO を有効化]** または **[SSO を無効化]** をクリックします。
|
||||

|
||||
4. SSH キーを認可する Organization を見つけます。
|
||||
5. **[承認]** をクリックします。
|
||||

|
||||
1. 認可する SSH キーの右側にある **[SSO の構成]** をクリックします。
|
||||
|
||||

|
||||
1. SSH キーを認可する Organization の右側にある **[認可]** をクリックします。
|
||||
|
||||

|
||||
|
||||
## 参考資料
|
||||
|
||||
|
||||
@@ -16,10 +16,10 @@ topics:
|
||||
- SSH
|
||||
shortTitle: SSH key passphrases
|
||||
ms.openlocfilehash: 5ddacfa052b866fe1cbd601caa8a1ff9ab6934fd
|
||||
ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5
|
||||
ms.sourcegitcommit: 80842b4e4c500daa051eff0ccd7cde91c2d4bb36
|
||||
ms.translationtype: HT
|
||||
ms.contentlocale: ja-JP
|
||||
ms.lasthandoff: 09/05/2022
|
||||
ms.lasthandoff: 09/12/2022
|
||||
ms.locfileid: '147409116'
|
||||
---
|
||||
## SSH キーのパスフレーズについて
|
||||
|
||||
@@ -12,10 +12,10 @@ topics:
|
||||
- SSH
|
||||
shortTitle: SSL certificate problem
|
||||
ms.openlocfilehash: 26777edf5b312c8f45c5b1fb211b87648778cf13
|
||||
ms.sourcegitcommit: fcf3546b7cc208155fb8acdf68b81be28afc3d2d
|
||||
ms.sourcegitcommit: 80842b4e4c500daa051eff0ccd7cde91c2d4bb36
|
||||
ms.translationtype: HT
|
||||
ms.contentlocale: ja-JP
|
||||
ms.lasthandoff: 09/10/2022
|
||||
ms.lasthandoff: 09/11/2022
|
||||
ms.locfileid: '145088193'
|
||||
---
|
||||
以下のようなエラーが表示されます:
|
||||
|
||||
@@ -12,11 +12,11 @@ topics:
|
||||
- SSH
|
||||
shortTitle: Use SSH over HTTPS port
|
||||
ms.openlocfilehash: 47bdb96fac65d9432dfc54f671366d1b6c153556
|
||||
ms.sourcegitcommit: fb047f9450b41b24afc43d9512a5db2a2b750a2a
|
||||
ms.sourcegitcommit: 770ed406ec075528ec9c9695aa4bfdc8c8b25fd3
|
||||
ms.translationtype: HT
|
||||
ms.contentlocale: ja-JP
|
||||
ms.lasthandoff: 09/11/2022
|
||||
ms.locfileid: '145088152'
|
||||
ms.locfileid: '147883402'
|
||||
---
|
||||
{% tip %}
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
title: About billing for GitHub Actions
|
||||
intro: 'If you want to use {% data variables.product.prodname_actions %} beyond the storage or minutes included in your account, you will be billed for additional usage.'
|
||||
title: GitHub Actions の課金について
|
||||
intro: 'アカウントに含まれるストレージや利用時間 (分) を超えて{% data variables.product.prodname_actions %}を使用したい場合は、追加の使用分が請求されます。'
|
||||
miniTocMaxHeadingLevel: 3
|
||||
redirect_from:
|
||||
- /github/setting-up-and-managing-billing-and-payments-on-github/about-billing-for-github-actions
|
||||
@@ -13,102 +13,103 @@ topics:
|
||||
- Actions
|
||||
- Spending limits
|
||||
shortTitle: Billing for GitHub Actions
|
||||
ms.openlocfilehash: c4517bb6726abf811065b067740ce369ea69e117
|
||||
ms.sourcegitcommit: 478f2931167988096ae6478a257f492ecaa11794
|
||||
ms.translationtype: HT
|
||||
ms.contentlocale: ja-JP
|
||||
ms.lasthandoff: 09/09/2022
|
||||
ms.locfileid: '147763582'
|
||||
---
|
||||
## About billing for {% data variables.product.prodname_actions %}
|
||||
## {% data variables.product.prodname_actions %} の課金について
|
||||
|
||||
{% data reusables.actions.actions-billing %}
|
||||
|
||||
{% data reusables.actions.actions-spending-limit-brief %} For more information, see "[About spending limits](#about-spending-limits)."
|
||||
{% data reusables.actions.actions-spending-limit-brief %}詳細については、「[使用制限について](#about-spending-limits)」を参照してください。
|
||||
|
||||
{% ifversion ghec %}
|
||||
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 {% data variables.product.prodname_actions %} usage beyond the amounts including with your account. 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 %}Microsoft Enterprise Agreement を通じて {% data variables.product.prodname_enterprise %} を購入した場合は、ご自身の Azure サブスクリプション ID をエンタープライズ アカウントに接続して、ご自身のアカウントに含まれている金額を超える {% data variables.product.prodname_actions %} の使用を有効にして支払うことができます。 詳細については、「[Azure サブスクリプションを Enterprise に接続する](/billing/managing-billing-for-your-github-account/connecting-an-azure-subscription-to-your-enterprise)」を参照してください。
|
||||
{% endif %}
|
||||
|
||||
Minutes reset every month, while storage usage does not.
|
||||
時間 (分) は毎月リセットされますが、ストレージはリセットされません。
|
||||
|
||||
### Included storage and minutes
|
||||
### 含まれるストレージと分
|
||||
|
||||
{% ifversion actions-hosted-runners %}
|
||||
{% note %}
|
||||
{% ifversion actions-hosted-runners %} {% note %}
|
||||
|
||||
**Note**: Entitlement minutes cannot be used for Windows and Ubuntu runners over 2-cores. These runners will always be charged for, including in public repos. For more information, see "[Per-minute rates for runners](/billing/managing-billing-for-github-actions/about-billing-for-github-actions#per-minute-rates)."
|
||||
**注**: 2 コアを超える Windows ランナーおよび Ubuntu ランナーには、エンタイトルメント (分) を使用できません。 これらのランナーは、パブリック リポジトリを含め、常に課金されます。 詳しくは、[ランナーの 1 分あたりの料金](/billing/managing-billing-for-github-actions/about-billing-for-github-actions#per-minute-rates)に関するページを参照してください。
|
||||
|
||||
{% endnote %}
|
||||
{% endif %}
|
||||
{% endnote %} {% endif %}
|
||||
|
||||
|Product | Storage | Minutes (per month)|
|
||||
|製品 | Storage | 分 (月あたり)|
|
||||
|------- | ------- | ---------|
|
||||
| {% data variables.product.prodname_free_user %} | 500 MB | 2,000 |
|
||||
| {% data variables.product.prodname_pro %} | 1 GB | 3,000 |
|
||||
| {% data variables.product.prodname_free_team %} for organizations | 500 MB | 2,000 |
|
||||
| 組織の {% data variables.product.prodname_free_team %} | 500 MB | 2,000 |
|
||||
| {% data variables.product.prodname_team %} | 2 GB | 3,000 |
|
||||
| {% data variables.product.prodname_ghe_cloud %} | 50 GB | 50,000 |
|
||||
|
||||
Jobs that run on Windows and macOS runners that {% data variables.product.prodname_dotcom %} hosts consume minutes at 2 and 10 times the rate that jobs on Linux runners consume. For example, using 1,000 Windows minutes would consume 2,000 of the minutes included in your account. Using 1,000 macOS minutes, would consume 10,000 minutes included in your account.
|
||||
{% data variables.product.prodname_dotcom %}がホストするWindows及びmacOSのランナー上で実行されるジョブは、Linuxのランナー上のジョブの消費に対して2倍及び10倍の分を消費します。 たとえば、Windows で 1,000 分使用すると、アカウントに含まれている 2,000 分が消費されます。 macOS で 1,000 分使用すると、アカウントに含まれている 10,000 分が消費されます。
|
||||
|
||||
### Minute multipliers
|
||||
### 分の倍率
|
||||
|
||||
| Operating system | Minute multiplier |
|
||||
| オペレーティング システム | 分の倍率 |
|
||||
|------- | ---------|
|
||||
| Linux | 1 |
|
||||
| macOS| 10 |
|
||||
| Windows | 2 |
|
||||
|
||||
The storage used by a repository is the total storage used by {% data variables.product.prodname_actions %} artifacts and {% data variables.product.prodname_registry %}. Your storage cost is the total usage for all repositories owned by your account. For more information about pricing for {% data variables.product.prodname_registry %}, see "[About billing for {% data variables.product.prodname_registry %}](/billing/managing-billing-for-github-packages/about-billing-for-github-packages)."
|
||||
リポジトリが使用するストレージは、{% data variables.product.prodname_actions %}の成果物と{% data variables.product.prodname_registry %}の消費の合計のストレージです。 ストレージのコストは、お客様のアカウントで所有しているすべてのリポジトリの合計使用量です。 {% data variables.product.prodname_registry %} の価格について詳しくは、「[{% data variables.product.prodname_registry %} の課金について](/billing/managing-billing-for-github-packages/about-billing-for-github-packages)」を参照してください。
|
||||
|
||||
If your account's usage surpasses these limits and you have set a spending limit above $0 USD, you will pay $0.008 USD per GB of storage per day and per-minute usage depending on the operating system used by the {% data variables.product.prodname_dotcom %}-hosted runner. {% data variables.product.prodname_dotcom %} rounds the minutes each job uses up to the nearest minute.
|
||||
アカウントによる使用がこれらの制限を超え、使用制限を 0 米国ドルより上に設定している場合、日ごとにストレージの GB あたり 0.008 米国ドル、そして {% data variables.product.prodname_dotcom %} ホステッド ランナーで使用されるオペレーティング システムに応じた使用量を分単位で支払うことになります。 {% data variables.product.prodname_dotcom %}は、各ジョブが使用する分をもっとも近い分に丸めます。
|
||||
|
||||
{% note %}
|
||||
|
||||
**Note:** Minute multipliers do not apply to the per-minute rates shown below.
|
||||
**注:** 分の乗数は、以下に示す分あたりの料金には適用されません。
|
||||
|
||||
{% endnote %}
|
||||
|
||||
### Per-minute rates
|
||||
### 分あたりの料金
|
||||
|
||||
{% data reusables.billing.billing-standard-runners %}
|
||||
{% ifversion actions-hosted-runners %}{% data reusables.billing.billing-hosted-runners %}{% endif %}
|
||||
{% data reusables.billing.billing-standard-runners %} {% ifversion actions-hosted-runners %}{% data reusables.billing.billing-hosted-runners %}{% endif %}
|
||||
|
||||
- The number of jobs you can run concurrently across all repositories in your user or organization account depends on your GitHub plan. For more information, see "[Usage limits and billing](/actions/reference/usage-limits-billing-and-administration)" for {% data variables.product.prodname_dotcom %}-hosted runners and "[About self-hosted runners](/actions/hosting-your-own-runners/about-self-hosted-runners/#usage-limits)" for self-hosted runner usage limits.
|
||||
- {% data reusables.user-settings.context_switcher %}
|
||||
{% ifversion actions-hosted-runners %}
|
||||
- For {% data variables.actions.hosted_runner %}s, there is no additional cost for configurations that assign public static IP addresses to a {% data variables.actions.hosted_runner %}. For more information on {% data variables.actions.hosted_runner %}s, see "[Using {% data variables.actions.hosted_runner %}s](/actions/using-github-hosted-runners/using-larger-runners)."
|
||||
- Entitlement minutes cannot be used for {% data variables.actions.hosted_runner %}s.
|
||||
- アカウントもしくはOrganization内のすべてのリポジトリにわたって同時に実行できるジョブ数は、あなたのGitHubのプランによります。 詳細について、{% data variables.product.prodname_dotcom %} ホステッド ランナーに関しては「[使用制限と課金](/actions/reference/usage-limits-billing-and-administration)」を、セルフホステッド ランナーの使用制限に関しては「[セルフホステッド ランナーについて](/actions/hosting-your-own-runners/about-self-hosted-runners/#usage-limits)」を参照してください。
|
||||
- {% data reusables.user-settings.context_switcher %} {% ifversion actions-hosted-runners %}
|
||||
- {% data variables.actions.hosted_runner %} の場合、パブリック静的 IP アドレスを {% data variables.actions.hosted_runner %} に割り当てる構成に追加のコストは発生しません。 {% data variables.actions.hosted_runner %} について詳しくは、「[{% data variables.actions.hosted_runner %} の使用](/actions/using-github-hosted-runners/using-larger-runners)」を参照してください。
|
||||
- {% data variables.actions.hosted_runner %} にはエンタイトルメント (分) を使用できません。
|
||||
{% endif %}
|
||||
|
||||
## Calculating minute and storage spending
|
||||
## 利用時間 (分) とストレージ消費量の計算
|
||||
|
||||
{% data reusables.dotcom_billing.pricing_calculator.pricing_cal_actions %}
|
||||
|
||||
At the end of the month, {% data variables.product.prodname_dotcom %} calculates the cost of minutes and storage used over the amount included in your account.
|
||||
月末に、{% data variables.product.prodname_dotcom %}はアカウントに含まれている量に対して使用された分とストレージのコストを計算します。
|
||||
|
||||
### Sample minutes cost calculation
|
||||
### 分のコスト計算例
|
||||
|
||||
For example, if your organization uses {% data variables.product.prodname_team %} and allows unlimited spending, using 5,000 minutes could have a total storage and minute overage cost of $56 USD, depending on the operating systems used to run jobs.
|
||||
たとえば、Organizationが{% data variables.product.prodname_team %}を使用しており、使用量に制限をしていない場合、5,000分を使用すればジョブを実行しているオペレーティングシステムによって、合計でストレージと分は56米ドルの超過コストになるかもしれません。
|
||||
|
||||
- 5,000 (3,000 Linux and 2,000 Windows) minutes = $56 USD ($24 USD + $32 USD).
|
||||
- 3,000 Linux minutes at $0.008 USD per minute = $24 USD.
|
||||
- 2,000 Windows minutes at $0.016 USD per minute = $32 USD.
|
||||
- 5,000 (3,000 Linux と 2,000 Windows) 分 = 56米ドル (24米ドル + 32米ドル)。
|
||||
- 単価 0.008米ドル で 3,000 Linux 分 = 24米ドル。
|
||||
- 単価 0.016米ドル で 2,000 Windows 分 = 32米ドル。
|
||||
|
||||
{% data variables.product.prodname_dotcom %} calculates your storage usage for each month based on hourly usage during that month.
|
||||
{% data variables.product.prodname_dotcom %} 毎月の利用状況は、その月の時間あたりの利用状況に基づいて計算されます。
|
||||
|
||||
### Sample storage cost calculation
|
||||
### ストレージのコスト計算例
|
||||
|
||||
For example, if you use 3 GB of storage for 10 days of March and 12 GB for 21 days of March, your storage usage would be:
|
||||
たとえば、3 月の 10 日間に 3 GB のストレージを使用し、3 月の 21 日間に 12 GB 使用した場合、ストレージの使用量は次のようになります。
|
||||
|
||||
- 3 GB x 10 days x (24 hours per day) = 720 GB-Hours
|
||||
- 12 GB x 21 days x (24 hours per day) = 6,048 GB-Hours
|
||||
- 720 GB-Hours + 6,048 GB-Hours = 6,768 GB-Hours
|
||||
- 6,768 GB-Hours / (744 hours per month) = 9.0967 GB-Months
|
||||
- 3 GB x 10日 x (1日24 時間) = 720 GB時間
|
||||
- 12 GB x 21日 x (1日24 時間) = 6,048 GB時間
|
||||
- 720 GB時間 + 6,048 GB時間 = 6,768 GB時間
|
||||
- 6,768 GB時間 / (月あたり744時間) = 9.0967 GB月
|
||||
|
||||
At the end of the month, {% data variables.product.prodname_dotcom %} rounds your storage to the nearest MB. Therefore, your storage usage for March would be 9.097 GB.
|
||||
月末に、{% data variables.product.prodname_dotcom %}はストレージ使用量を最も近いGBに丸めます。 そのため、3 月のストレージ使用量は 9.097 GB になります。
|
||||
|
||||
Your {% data variables.product.prodname_actions %} usage shares your account's existing billing date, payment method, and receipt. {% data reusables.dotcom_billing.view-all-subscriptions %}
|
||||
{% data variables.product.prodname_actions %} の利用については、アカウントの既存の請求日、支払い方法、領収書が共有されます。 {% data reusables.dotcom_billing.view-all-subscriptions %}
|
||||
|
||||
## About spending limits
|
||||
## 利用上限について
|
||||
|
||||
{% data reusables.actions.actions-spending-limit-detailed %}
|
||||
|
||||
For information on managing and changing your account's spending limit, see "[Managing your spending limit for {% data variables.product.prodname_actions %}](/billing/managing-billing-for-github-actions/managing-your-spending-limit-for-github-actions)."
|
||||
アカウントの使用制限の管理と変更については、「[{% data variables.product.prodname_actions %} の使用制限の管理](/billing/managing-billing-for-github-actions/managing-your-spending-limit-for-github-actions)」を参照してください。
|
||||
|
||||
{% data reusables.dotcom_billing.actions-packages-unpaid-account %}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
---
|
||||
title: Viewing your GitHub Codespaces usage
|
||||
title: GitHub Codespaces の使用状況の表示
|
||||
shortTitle: Viewing your usage
|
||||
intro: 'You can view the compute minutes and storage used by {% data variables.product.prodname_github_codespaces %}.'
|
||||
intro: '{% data variables.product.prodname_github_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.'
|
||||
product: '{% data reusables.gated-features.codespaces %}'
|
||||
versions:
|
||||
@@ -13,28 +13,29 @@ topics:
|
||||
- Billing
|
||||
redirect_from:
|
||||
- /billing/managing-billing-for-github-codespaces/viewing-your-codespaces-usage
|
||||
ms.openlocfilehash: 59c7baf22070f534ea42ddde561a4b739a01fed1
|
||||
ms.sourcegitcommit: 478f2931167988096ae6478a257f492ecaa11794
|
||||
ms.translationtype: HT
|
||||
ms.contentlocale: ja-JP
|
||||
ms.lasthandoff: 09/09/2022
|
||||
ms.locfileid: '147865162'
|
||||
---
|
||||
## 組織の {% data variables.product.prodname_github_codespaces %} の使用状況を表示する
|
||||
|
||||
## Viewing {% data variables.product.prodname_github_codespaces %} usage for your organization
|
||||
|
||||
Organization owners and billing managers can view {% data variables.product.prodname_github_codespaces %} usage for an organization. For organizations managed by an enterprise account, the organization owners can view {% data variables.product.prodname_codespaces %} usage in the organization billing page, and enterprise admins can view the usage for the entire enterprise.
|
||||
組織については、組織所有者と支払いマネージャーが {% data variables.product.prodname_github_codespaces %} の使用状況を管理できます。 Enterpriseアカウントが管理しているOrganizationでは、OrganizationのオーナーはOrganizationの支払いページで{% data variables.product.prodname_codespaces %}の使用状況を見ることができ、Enterpriseの管理者はEnterprise全体の使用状況を見ることができます。
|
||||
|
||||
{% data reusables.organizations.billing-settings %}
|
||||
1. Under "{% data variables.product.prodname_codespaces %}", view the details of the compute hours and storage used so far this month.
|
||||

|
||||
{% data reusables.dotcom_billing.actions-packages-report-download-org-account %}
|
||||
1. Filter the report to show only rows that mention "Codespaces" in the `Product` field.
|
||||
1. [{% data variables.product.prodname_codespaces %}] で、今月これまでに使用されたコンピューティング時間とストレージについて詳しく説明します。
|
||||
 {% data reusables.dotcom_billing.actions-packages-report-download-org-account %}
|
||||
1. `Product` フィールドで "Codespaces" に言及している行のみが表示されるように、レポートをフィルター処理します。
|
||||
|
||||

|
||||

|
||||
|
||||
{% ifversion ghec %}
|
||||
## Viewing {% data variables.product.prodname_codespaces %} usage for your enterprise account
|
||||
## エンタープライズ アカウントの {% data variables.product.prodname_codespaces %} の使用状況を表示する
|
||||
|
||||
Enterprise owners and billing managers can view {% data variables.product.prodname_codespaces %} usage for an enterprise account.
|
||||
エンタープライズ アカウントについては、エンタープライズ所有者と支払いマネージャーが {% data variables.product.prodname_codespaces %} の使用状況を確認できます。
|
||||
|
||||
{% data reusables.enterprise-accounts.access-enterprise %}
|
||||
{% data reusables.enterprise-accounts.settings-tab %}
|
||||
{% data reusables.enterprise-accounts.billing-tab %}
|
||||
1. Under "{% data variables.product.prodname_codespaces %}", view the usage details of each organization in your enterprise account.
|
||||
{% data reusables.enterprise-accounts.actions-packages-report-download-enterprise-accounts %}
|
||||
{% endif %}
|
||||
{% data reusables.enterprise-accounts.access-enterprise %} {% data reusables.enterprise-accounts.settings-tab %} {% data reusables.enterprise-accounts.billing-tab %}
|
||||
1. 「{% data variables.product.prodname_codespaces %}」の下で、Enterpriseアカウント内の各Organizationの使用状況の詳細を見ます。
|
||||
{% data reusables.enterprise-accounts.actions-packages-report-download-enterprise-accounts %} {% endif %}
|
||||
|
||||
@@ -8,11 +8,11 @@ topics:
|
||||
- Copilot
|
||||
shortTitle: Your GitHub Copilot subscription
|
||||
ms.openlocfilehash: 9cdd9e46dcbfe433f5d0b6ba25bda4c798dca06b
|
||||
ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5
|
||||
ms.sourcegitcommit: fcf3546b7cc208155fb8acdf68b81be28afc3d2d
|
||||
ms.translationtype: HT
|
||||
ms.contentlocale: ja-JP
|
||||
ms.lasthandoff: 09/05/2022
|
||||
ms.locfileid: '147080260'
|
||||
ms.lasthandoff: 09/11/2022
|
||||
ms.locfileid: '147884158'
|
||||
---
|
||||
## {% data variables.product.prodname_copilot %} の試用版の設定
|
||||
|
||||
|
||||
@@ -17,11 +17,11 @@ topics:
|
||||
- User account
|
||||
shortTitle: Your spending limit
|
||||
ms.openlocfilehash: 0919283804124e2e925793dd3d4969b80f46ed30
|
||||
ms.sourcegitcommit: fb047f9450b41b24afc43d9512a5db2a2b750a2a
|
||||
ms.sourcegitcommit: fcf3546b7cc208155fb8acdf68b81be28afc3d2d
|
||||
ms.translationtype: HT
|
||||
ms.contentlocale: ja-JP
|
||||
ms.lasthandoff: 09/11/2022
|
||||
ms.locfileid: '145088013'
|
||||
ms.locfileid: '147884150'
|
||||
---
|
||||
## {% data variables.product.prodname_registry %} の利用上限について
|
||||
|
||||
|
||||
@@ -14,11 +14,11 @@ topics:
|
||||
- Troubleshooting
|
||||
shortTitle: Declined credit card charge
|
||||
ms.openlocfilehash: 44ed836d24e23ceb7e805cccdad6e70203381bf5
|
||||
ms.sourcegitcommit: fb047f9450b41b24afc43d9512a5db2a2b750a2a
|
||||
ms.sourcegitcommit: fcf3546b7cc208155fb8acdf68b81be28afc3d2d
|
||||
ms.translationtype: HT
|
||||
ms.contentlocale: ja-JP
|
||||
ms.lasthandoff: 09/11/2022
|
||||
ms.locfileid: '145087845'
|
||||
ms.locfileid: '147884222'
|
||||
---
|
||||
カードが拒否された場合、その支払いが拒否された理由についてメールが送られます。 再び請求される前、その問題を解決するための数日間の猶予があります。
|
||||
|
||||
|
||||
@@ -15,10 +15,10 @@ redirect_from:
|
||||
- /admin/code-security/managing-github-advanced-security-for-your-enterprise/deploying-github-advanced-security-in-your-enterprise
|
||||
miniTocMaxHeadingLevel: 2
|
||||
ms.openlocfilehash: 0993205a2f51262c0766062995caa1c2e2714742
|
||||
ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5
|
||||
ms.sourcegitcommit: 76b840f45ba85fb79a7f0c1eb43bc663b3eadf2b
|
||||
ms.translationtype: HT
|
||||
ms.contentlocale: ja-JP
|
||||
ms.lasthandoff: 09/05/2022
|
||||
ms.lasthandoff: 09/12/2022
|
||||
ms.locfileid: '147145426'
|
||||
---
|
||||
## これらの記事について
|
||||
|
||||
@@ -13,11 +13,11 @@ topics:
|
||||
- Code scanning
|
||||
- CodeQL
|
||||
ms.openlocfilehash: 1e540aa8b061e0bbdd5b7be1a2563cd983cfb753
|
||||
ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5
|
||||
ms.sourcegitcommit: fb047f9450b41b24afc43d9512a5db2a2b750a2a
|
||||
ms.translationtype: HT
|
||||
ms.contentlocale: ja-JP
|
||||
ms.lasthandoff: 09/05/2022
|
||||
ms.locfileid: '147067635'
|
||||
ms.lasthandoff: 09/11/2022
|
||||
ms.locfileid: '147881228'
|
||||
---
|
||||
{% data reusables.code-scanning.beta %} {% data reusables.code-scanning.enterprise-enable-code-scanning %}
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
title: Configuring code scanning
|
||||
intro: 'You can configure how {% data variables.product.prodname_dotcom %} scans the code in your project for vulnerabilities and errors.'
|
||||
title: Code scanningを設定する
|
||||
intro: '{% data variables.product.prodname_dotcom %} がプロジェクトのコードをスキャンして脆弱性やエラーを検出する方法を設定できます。'
|
||||
product: '{% data reusables.gated-features.code-scanning %}'
|
||||
permissions: 'People with write permissions to a repository can configure {% data variables.product.prodname_code_scanning %} for the repository.'
|
||||
miniTocMaxHeadingLevel: 3
|
||||
@@ -23,85 +23,82 @@ topics:
|
||||
- JavaScript
|
||||
- Python
|
||||
shortTitle: Configure code scanning
|
||||
ms.openlocfilehash: 9786c51f2b29ffa22d4238fe6b47b241717c32f9
|
||||
ms.sourcegitcommit: 478f2931167988096ae6478a257f492ecaa11794
|
||||
ms.translationtype: HT
|
||||
ms.contentlocale: ja-JP
|
||||
ms.lasthandoff: 09/09/2022
|
||||
ms.locfileid: '147717862'
|
||||
---
|
||||
{% data reusables.code-scanning.beta %} {% data reusables.code-scanning.enterprise-enable-code-scanning-actions %}
|
||||
|
||||
{% ifversion ghes or ghae %} {% note %}
|
||||
|
||||
{% data reusables.code-scanning.beta %}
|
||||
{% data reusables.code-scanning.enterprise-enable-code-scanning-actions %}
|
||||
**メモ:** この記事では、このバージョンの {% data variables.product.product_name %} の初期リリースに含まれる CodeQL アクションのバージョンおよび関連する CodeQL CLI バンドルで使用できる機能について説明します。 企業でより新しいバージョンの CodeQL アクションを使用している場合は、最新の機能の詳細について [{% data variables.product.prodname_ghe_cloud %} の記事](/enterprise-cloud@latest/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning)を参照してください。 {% ifversion not ghae %}最新バージョンの使用については、「[Configuring code scanning for your appliance](/admin/advanced-security/configuring-code-scanning-for-your-appliance#configuring-codeql-analysis-on-a-server-without-internet-access)」(アプライアンスのコード スキャニングの構成) を参照してください。{% endif %}
|
||||
|
||||
{% ifversion ghes or ghae %}
|
||||
{% note %}
|
||||
{% endnote %} {% endif %}
|
||||
|
||||
**Note:** This article describes the features available with the version of the CodeQL action and associated CodeQL CLI bundle included in the initial release of this version of {% data variables.product.product_name %}. If your enterprise uses a more recent version of the CodeQL action, see the [{% data variables.product.prodname_ghe_cloud %} article](/enterprise-cloud@latest/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning) for information on the latest features. {% ifversion not ghae %} For information on using the latest version, see "[Configuring code scanning for your appliance](/admin/advanced-security/configuring-code-scanning-for-your-appliance#configuring-codeql-analysis-on-a-server-without-internet-access)."{% endif %}
|
||||
## {% data variables.product.prodname_code_scanning %} の設定について
|
||||
|
||||
{% endnote %}
|
||||
{% endif %}
|
||||
{% data variables.product.prodname_actions %}を使って、あるいは継続的インテグレーション(CI)システムから、{% data variables.product.product_name %}上で{% data variables.product.prodname_code_scanning %}を実行できます。 詳細については、[{% data variables.product.prodname_actions %} に関する](/actions/getting-started-with-github-actions/about-github-actions)ページまたは「[CI システムの {% data variables.product.prodname_codeql %} {% data variables.product.prodname_code_scanning %} について](/code-security/secure-coding/about-codeql-code-scanning-in-your-ci-system)」を参照してください。
|
||||
|
||||
## About {% data variables.product.prodname_code_scanning %} configuration
|
||||
この記事は、Actionsを使って{% data variables.product.product_name %} 上で {% data variables.product.prodname_code_scanning %} を実行することについて説明しています。
|
||||
|
||||
You can run {% data variables.product.prodname_code_scanning %} on {% data variables.product.product_name %}, using {% data variables.product.prodname_actions %}, or from your continuous integration (CI) system. For more information, see "[About {% data variables.product.prodname_actions %}](/actions/getting-started-with-github-actions/about-github-actions)" or "[About {% data variables.product.prodname_codeql %} {% data variables.product.prodname_code_scanning %} in your CI system](/code-security/secure-coding/about-codeql-code-scanning-in-your-ci-system)."
|
||||
|
||||
This article is about running {% data variables.product.prodname_code_scanning %} on {% data variables.product.product_name %} using actions.
|
||||
|
||||
Before you can configure {% data variables.product.prodname_code_scanning %} for a repository, you must set up {% data variables.product.prodname_code_scanning %} by adding a {% data variables.product.prodname_actions %} workflow to the repository. 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_actions %} ワークフローを追加して {% data variables.product.prodname_code_scanning %} をセットアップする必要があります。 詳細については、「[リポジトリの {% data variables.product.prodname_code_scanning %} の設定](/code-security/secure-coding/setting-up-code-scanning-for-a-repository)」を参照してください。
|
||||
|
||||
{% data reusables.code-scanning.edit-workflow %}
|
||||
|
||||
{% data variables.product.prodname_codeql %} analysis is just one type of {% data variables.product.prodname_code_scanning %} you can do in {% data variables.product.prodname_dotcom %}. {% data variables.product.prodname_marketplace %}{% ifversion ghes %} on {% data variables.product.prodname_dotcom_the_website %}{% endif %} contains other {% data variables.product.prodname_code_scanning %} workflows you can use. {% ifversion fpt or ghec %}You can find a selection of these on the "Get started with {% data variables.product.prodname_code_scanning %}" page, which you can access from the **{% octicon "shield" aria-label="The shield symbol" %} Security** tab.{% endif %} The specific examples given in this article relate to the {% data variables.product.prodname_codeql_workflow %} file.
|
||||
{% data variables.product.prodname_codeql %} 解析は、{% data variables.product.prodname_dotcom %} で実行できる {% data variables.product.prodname_code_scanning %} のほんの一例に過ぎません。 {% ifversion ghes %}{% data variables.product.prodname_dotcom_the_website %} 上の {% endif %}{% data variables.product.prodname_marketplace %} には、使用できる他の {% data variables.product.prodname_code_scanning %} ワークフローが含まれます。 {% ifversion fpt or ghec %}これらの選択肢は、 **{% octicon "shield" aria-label="The shield symbol" %} Security** タブからアクセスできる [{% data variables.product.prodname_code_scanning %} を開始する] ページにあります。{% endif %} この記事で示す例は、{% data variables.product.prodname_codeql_workflow %} ファイルに関連しています。
|
||||
|
||||
## Editing a {% data variables.product.prodname_code_scanning %} workflow
|
||||
## {% data variables.product.prodname_code_scanning %}ワークフローの編集
|
||||
|
||||
{% data variables.product.prodname_dotcom %} saves workflow files in the _.github/workflows_ directory of your repository. You can find a workflow you have added by searching for its file name. For example, by default, the workflow file for {% data variables.product.prodname_codeql %} {% data variables.product.prodname_code_scanning %} is called _codeql-analysis.yml_.
|
||||
{% data variables.product.prodname_dotcom %} によって、リポジトリの _.github/workflows_ ディレクトリにワークフロー ファイルが保存されます。 追加したワークフローは、そのファイル名を検索して見つけることができます。 たとえば、既定では、{% data variables.product.prodname_codeql %} {% data variables.product.prodname_code_scanning %} のワークフロー ファイルは、_codeql-analysis.yml_ という名前です。
|
||||
|
||||
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" %}.
|
||||

|
||||
1. After you have edited the file, click **Start commit** and complete the "Commit changes" form. You can choose to commit directly to the current branch, or create a new branch and start a pull request.
|
||||

|
||||
1. リポジトリで、編集したいワークフローファイルにアクセスします。
|
||||
1. ファイル ビューの右上隅の {% octicon "pencil" aria-label="The edit icon" %} をクリックして、ワークフロー エディターを開きます。
|
||||

|
||||
1. ファイルを編集したら、**[コミットの開始]** をクリックし、[変更のコミット] フォームに入力します。 現在のブランチに直接コミットするか、新しいブランチを作成して pull request を開始するかを選択できます。
|
||||

|
||||
|
||||
For more information about editing workflow files, see "[Learn {% data variables.product.prodname_actions %}](/actions/learn-github-actions)."
|
||||
ワークフロー ファイルの編集の詳細については、「[{% data variables.product.prodname_actions %} について学ぶ](/actions/learn-github-actions)」を参照してください。
|
||||
|
||||
## Configuring frequency
|
||||
## 頻度を設定する
|
||||
|
||||
You can configure the {% data variables.product.prodname_codeql_workflow %} to scan code on a schedule or when specific events occur in a repository.
|
||||
スケジュール設定されているときや、リポジトリで特定のイベントが発生したときに、コードをスキャンするように {% data variables.product.prodname_codeql_workflow %} を設定できます。
|
||||
|
||||
Scanning code when someone pushes a change, and whenever a pull request is created, prevents developers from introducing new vulnerabilities and errors into the code. Scanning code on a schedule informs you about the latest vulnerabilities and errors that {% data variables.product.company_short %}, security researchers, and the community discover, even when developers aren't actively maintaining the repository.
|
||||
リポジトリへのプッシュごと、およびプルリクエストが作成されるたびにコードをスキャンすることで、開発者がコードに新しい脆弱性やエラーをもたらすことを防ぎます。 スケジュールに従ってコードをスキャンすると、開発者がリポジトリを積極的に維持していない場合でも、{% data variables.product.company_short %}、セキュリティ研究者、コミュニティが発見した最新の脆弱性とエラーが通知されます。
|
||||
|
||||
### Scanning on push
|
||||
### プッシュ時にスキャンする
|
||||
|
||||
By default, the {% data variables.product.prodname_codeql_workflow %} uses the `on.push` event to trigger a code scan on every push to the default branch of the repository and any protected branches. For {% data variables.product.prodname_code_scanning %} to be triggered on a specified branch, the workflow must exist in that branch. For more information, see "[Workflow syntax for {% data variables.product.prodname_actions %}](/actions/reference/workflow-syntax-for-github-actions#on)."
|
||||
既定では、{% data variables.product.prodname_codeql_workflow %} で、リポジトリの既定のブランチと保護されたブランチへのプッシュごとにコード スキャンをトリガーするのに `on.push` イベントが使用されます。 指定したブランチで {% data variables.product.prodname_code_scanning %} がトリガーされるようにするには、ワークフローがそのブランチに存在している必要があります。 詳細については、[{% data variables.product.prodname_actions %} のワークフロー構文](/actions/reference/workflow-syntax-for-github-actions#on)に関するページを参照してください。
|
||||
|
||||
If you scan on push, then the results appear in the **Security** tab for your repository. For more information, see "[Managing code scanning alerts for your repository](/code-security/secure-coding/managing-code-scanning-alerts-for-your-repository#viewing-the-alerts-for-a-repository)."
|
||||
プッシュ時にスキャンすると、結果がリポジトリの **[セキュリティ]** タブに表示されます。 詳細については、「[リポジトリの code scanning アラートの管理](/code-security/secure-coding/managing-code-scanning-alerts-for-your-repository#viewing-the-alerts-for-a-repository)」を参照してください。
|
||||
|
||||
{% ifversion fpt or ghes > 3.2 or ghae or ghec %}
|
||||
Additionally, when an `on:push` scan returns results that can be mapped to an open pull request, these alerts will automatically appear on the pull request in the same places as other pull request alerts. The alerts are identified by comparing the existing analysis of the head of the branch to the analysis for the target branch. For more information on {% data variables.product.prodname_code_scanning %} alerts in pull requests, see "[Triaging {% data variables.product.prodname_code_scanning %} alerts in pull requests](/code-security/secure-coding/triaging-code-scanning-alerts-in-pull-requests)."
|
||||
{% ifversion fpt or ghes > 3.2 or ghae or ghec %} さらに、`on:push` スキャンから返される結果を、開いている pull request にマップできる場合、これらのアラートは、他の pull request アラートと同じ場所にある pull request に自動的に表示されます。 これらのアラートは、ブランチのヘッドの既存の分析とターゲット ブランチの分析を比較することで特定します。 pull request の {% data variables.product.prodname_code_scanning %} アラートの詳細については、「[pull request の {% data variables.product.prodname_code_scanning %} アラートのトリアージ](/code-security/secure-coding/triaging-code-scanning-alerts-in-pull-requests)」を参照してください。
|
||||
{% endif %}
|
||||
|
||||
### Scanning pull requests
|
||||
### Pull Requestをスキャンする
|
||||
|
||||
The default {% data variables.product.prodname_codeql_workflow %} uses the `pull_request` event to trigger a code scan on pull requests targeted against the default branch. {% ifversion ghes %}The `pull_request` event is not triggered if the pull request was opened from a private fork.{% else %}If a pull request is from a private fork, the `pull_request` event will only be triggered if you've selected the "Run workflows from fork pull requests" option in the repository settings. 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#enabling-workflows-for-private-repository-forks)."{% endif %}
|
||||
既定の {% data variables.product.prodname_codeql_workflow %} では、既定のブランチに対する pull request のコード スキャンをトリガーするのに `pull_request` イベントが使用されます。 {% ifversion ghes %}`pull_request` イベントは、pull request がプライベート フォークから開かれた場合、トリガーされません。{% else %}pull request がプライベート フォークからのものである場合、`pull_request` イベントは、リポジトリの設定で [フォークの pull request からワークフローを実行] オプションを選択している場合にのみトリガーされます。 詳細については、「[リポジトリの {% data variables.product.prodname_actions %} 設定の管理](/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository#enabling-workflows-for-private-repository-forks)」を参照してください。{% endif %}
|
||||
|
||||
For more information about the `pull_request` event, see "[Events that trigger workflows](/actions/learn-github-actions/events-that-trigger-workflows#pull_request)."
|
||||
`pull_request` イベントの詳細については、「[ワークフローをトリガーするイベント](/actions/learn-github-actions/events-that-trigger-workflows#pull_request)」を参照してください。
|
||||
|
||||
If you scan pull requests, then the results appear as alerts in a pull request check. For more information, see "[Triaging code scanning alerts in pull requests](/code-security/secure-coding/triaging-code-scanning-alerts-in-pull-requests)."
|
||||
pull requests をスキャンすると、結果は pull request チェックのアラートとして表示されます。 詳細については、「[pull request での Code Scanning アラートのトリアージ](/code-security/secure-coding/triaging-code-scanning-alerts-in-pull-requests)」を参照してください。
|
||||
|
||||
{% ifversion fpt or ghes > 3.2 or ghae or ghec %}
|
||||
Using the `pull_request` trigger, configured to scan the pull request's merge commit rather than the head commit, will produce more efficient and accurate results than scanning the head of the branch on each push. However, if you use a CI/CD system that cannot be configured to trigger on pull requests, you can still use the `on:push` trigger and {% data variables.product.prodname_code_scanning %} will map the results to open pull requests on the branch and add the alerts as annotations on the pull request. For more information, see "[Scanning on push](/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#scanning-on-push)."
|
||||
{% ifversion fpt or ghes > 3.2 or ghae or ghec %} ヘッド コミットではなく pull request のマージ コミットをスキャンするように構成された `pull_request` トリガーを使用すると、各プッシュでブランチのヘッドをスキャンするより効率的で正確な結果が生成されます。 ただし、使用している CI/CD システムで、pull request でトリガーするように構成できない場合でも、`on:push` トリガーは引き続き使用できます。また、{% data variables.product.prodname_code_scanning %} により、結果がブランチの開いている pull request にマッピングされ、アラートが注釈としてその pull request に追加されます。 詳細については、「[プッシュ時のスキャン](/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#scanning-on-push)」を参照してください。
|
||||
{% endif %}
|
||||
|
||||
### Defining the severities causing pull request check failure
|
||||
### pull request チェック エラーの原因となる重大度を定義する
|
||||
|
||||
By default, only alerts with the severity level of `Error` or security severity level of `Critical` or `High` will cause a pull request check failure, and a check will still succeed with alerts of lower severities. You can change the levels of alert severities and of security severities that will cause a pull request check failure in your repository settings. For more information about severity levels, see "[About code scanning alerts](/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/about-code-scanning-alerts#about-alert-details)."
|
||||
既定では、重大度レベルが `Error` または セキュリティの重大度レベルが `Critical` か `High` であるアラートの場合にのみ、pull request チェック エラーが発生し、重大度が低いアラートではチェックは成功します pull request チェック エラーを引き起こすアラートの重大度とセキュリティの重大度のレベルは、リポジトリの設定で変更できます。 重大度レベルの詳細については、[Code Scanning アラートについて](/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/about-code-scanning-alerts#about-alert-details)のページを参照してください。
|
||||
|
||||
{% data reusables.repositories.navigate-to-repo %}
|
||||
{% data reusables.repositories.sidebar-settings %}
|
||||
{% data reusables.repositories.navigate-to-code-security-and-analysis %}
|
||||
1. Under "Code scanning", to the right of "Check Failure", use the drop-down menu to select the level of severity you would like to cause a pull request check failure.
|
||||

|
||||
{% data reusables.repositories.navigate-to-repo %} {% data reusables.repositories.sidebar-settings %} {% data reusables.repositories.navigate-to-code-security-and-analysis %}
|
||||
1. "Code scanning"の下で、"Check Failure(チェックの失敗)"の右のドロップダウンメニューを使い、Pull Requestのチェックの失敗を引き起こさせたい重要度のレベルを選択してください。
|
||||

|
||||
|
||||
### Avoiding unnecessary scans of pull requests
|
||||
### Pull Requestの不要なスキャンを回避する
|
||||
|
||||
You might want to avoid a code scan being triggered on specific pull requests targeted against the default branch, irrespective of which files have been changed. You can configure this by specifying `on:pull_request:paths-ignore` or `on:pull_request:paths` in the {% data variables.product.prodname_code_scanning %} workflow. For example, if the only changes in a pull request are to files with the file extensions `.md` or `.txt` you can use the following `paths-ignore` array.
|
||||
変更されたファイルに関係なく、既定のブランチを対象とする特定の pull request でコード スキャンがトリガーされないようにしたい場合があります。 これを構成するには、{% data variables.product.prodname_code_scanning %} ワークフローで `on:pull_request:paths-ignore` または `on:pull_request:paths` を指定します。 たとえば、pull request 内の変更がファイル拡張子 `.md` または `.txt` のファイルに対するものだけである場合、次の `paths-ignore` 配列を使用できます。
|
||||
|
||||
``` yaml
|
||||
on:
|
||||
@@ -116,28 +113,28 @@ on:
|
||||
|
||||
{% note %}
|
||||
|
||||
**Notes**
|
||||
**メモ**
|
||||
|
||||
* `on:pull_request:paths-ignore` and `on:pull_request:paths` set conditions that determine whether the actions in the workflow will run on a pull request. They don't determine what files will be analyzed when the actions _are_ run. When a pull request contains any files that are not matched by `on:pull_request:paths-ignore` or `on:pull_request:paths`, the workflow runs the actions and scans all of the files changed in the pull request, including those matched by `on:pull_request:paths-ignore` or `on:pull_request:paths`, unless the files have been excluded. For information on how to exclude files from analysis, see "[Specifying directories to scan](#specifying-directories-to-scan)."
|
||||
* For {% data variables.product.prodname_codeql %} {% data variables.product.prodname_code_scanning %} workflow files, don't use the `paths-ignore` or `paths` keywords with the `on:push` event as this is likely to cause missing analyses. For accurate results, {% data variables.product.prodname_codeql %} {% data variables.product.prodname_code_scanning %} needs to be able to compare new changes with the analysis of the previous commit.
|
||||
* `on:pull_request:paths-ignore` と `on:pull_request:paths` で、ワークフロー内のアクションが pull request で実行されるかどうかを決定する条件を設定します。 アクションが実行 _される_ ときにどのファイルが解析されるかは決定されません。 pull request に `on:pull_request:paths-ignore` または `on:pull_request:paths` で一致しないファイルが含まれている場合、ワークフローによって、アクションが実行され、そのファイルが除外されていない限り、`on:pull_request:paths-ignore` または `on:pull_request:paths` で一致するファイルを含め、pull request で変更されたすべてのファイルがスキャンされます。 分析からファイルを除外する方法については、「[スキャンするディレクトリを指定する](#specifying-directories-to-scan)」を参照してください。
|
||||
* {% data variables.product.prodname_codeql %} {% data variables.product.prodname_code_scanning %} ワークフロー ファイルの場合、`on:push` イベントで `paths-ignore` または `paths` キーワードを使用しないでください。解析に漏れが生じるおそれがあります。 正確な結果を得るには、{% data variables.product.prodname_codeql %} {% data variables.product.prodname_code_scanning %} が新しい変更を前回のコミットの解析と比較できる必要があります。
|
||||
|
||||
{% endnote %}
|
||||
|
||||
For more information about using `on:pull_request:paths-ignore` and `on:pull_request:paths` to determine when a workflow will run for a pull request, see "[Workflow syntax for {% data variables.product.prodname_actions %}](/actions/reference/workflow-syntax-for-github-actions#onpushpull_requestpull_request_targetpathspaths-ignore)."
|
||||
`on:pull_request:paths-ignore` と `on:pull_request:paths` を使用して pull request に対してワークフローをいつ実行するかを決定する方法については、「[{% data variables.product.prodname_actions %} のワークフロー構文](/actions/reference/workflow-syntax-for-github-actions#onpushpull_requestpull_request_targetpathspaths-ignore)」を参照してください。
|
||||
|
||||
### Scanning on a schedule
|
||||
### スケジュールに従ってスキャンする
|
||||
|
||||
If you use the default {% data variables.product.prodname_codeql_workflow %}, the workflow will scan the code in your repository once a week, in addition to the scans triggered by events. To adjust this schedule, edit the `cron` value in the workflow. For more information, see "[Workflow syntax for {% data variables.product.prodname_actions %}](/actions/reference/workflow-syntax-for-github-actions#onschedule)."
|
||||
デフォルトの{% data variables.product.prodname_codeql_workflow %}を使用すると、このワークフローはイベントによってトリガーされるスキャンに加えて、リポジトリ内のコードを週に1回スキャンします。 このスケジュールを調整するには、ワークフローの `cron` 値を編集します。 詳細については、[{% data variables.product.prodname_actions %} のワークフロー構文](/actions/reference/workflow-syntax-for-github-actions#onschedule)に関するページを参照してください。
|
||||
|
||||
{% note %}
|
||||
|
||||
**Note**: {% data variables.product.prodname_dotcom %} only runs scheduled jobs that are in workflows on the default branch. Changing the schedule in a workflow on any other branch has no effect until you merge the branch into the default branch.
|
||||
**メモ**: {% data variables.product.prodname_dotcom %} では、既定のブランチのワークフロー内にあるスケジュール設定されたジョブのみが実行されます。 他のブランチのワークフローでスケジュールを変更しても、ブランチをデフォルトブランチにマージするまで影響はありません。
|
||||
|
||||
{% endnote %}
|
||||
|
||||
### Example
|
||||
### 例
|
||||
|
||||
The following example shows a {% data variables.product.prodname_codeql_workflow %} for a particular repository that has a default branch called `main` and one protected branch called `protected`.
|
||||
次の例は、既定のブランチの名前が `main` で、`protected` という名前の保護されたブランチがある特定のリポジトリの {% data variables.product.prodname_codeql_workflow %} を示しています。
|
||||
|
||||
``` yaml
|
||||
on:
|
||||
@@ -149,14 +146,14 @@ on:
|
||||
- cron: '20 14 * * 1'
|
||||
```
|
||||
|
||||
This workflow scans:
|
||||
* Every push to the default branch and the protected branch
|
||||
* Every pull request to the default branch
|
||||
* The default branch every Monday at 14:20 UTC
|
||||
このワークフローでは以下をスキャンします。
|
||||
* 既定のブランチと保護されたブランチへのすべてのプッシュ
|
||||
* 既定のブランチへのすべての pull request
|
||||
* 毎週月曜日 14 時 20 分 (UTC) に既定のブランチ
|
||||
|
||||
## Specifying an operating system
|
||||
## オペレーティングシステムを指定する
|
||||
|
||||
If your code requires a specific operating system to compile, you can configure the operating system in your {% data variables.product.prodname_codeql_workflow %}. Edit the value of `jobs.analyze.runs-on` to specify the operating system for the machine that runs your {% data variables.product.prodname_code_scanning %} actions. {% ifversion ghes %}You specify the operating system by using an appropriate label as the second element in a two-element array, after `self-hosted`.{% else %}
|
||||
コードのコンパイルに特定のオペレーティングシステムが必要な場合は、そのオペレーティングシステムを {% data variables.product.prodname_codeql_workflow %} で設定できます。 `jobs.analyze.runs-on` の値を編集して、{% data variables.product.prodname_code_scanning %} アクションを実行するコンピューターのオペレーティング システムを指定します。 {% ifversion ghes %}2 つの要素からなる配列の 2 番目の要素として、`self-hosted` の後に、適切なラベルを使用して、オペレーティング システムを指定します。{% else %}
|
||||
|
||||
``` yaml
|
||||
jobs:
|
||||
@@ -165,7 +162,7 @@ jobs:
|
||||
runs-on: [ubuntu-latest]
|
||||
```
|
||||
|
||||
If you choose to use a self-hosted runner for code scanning, you can specify an operating system by using an appropriate label as the second element in a two-element array, after `self-hosted`.{% endif %}
|
||||
Code Scanning にセルフホスト ランナーを使うことにした場合は、2 つの要素からなる配列の 2 番目の要素として、`self-hosted` の後に、適切なラベルを使用して、オペレーティング システムを指定できます。{% endif %}
|
||||
|
||||
``` yaml
|
||||
jobs:
|
||||
@@ -174,15 +171,15 @@ jobs:
|
||||
runs-on: [self-hosted, ubuntu-latest]
|
||||
```
|
||||
|
||||
{% data variables.product.prodname_codeql %} {% data variables.product.prodname_code_scanning %} supports the latest versions of Ubuntu, Windows, and macOS. Typical values for this setting are therefore: `ubuntu-latest`, `windows-latest`, and `macos-latest`. For more information, see "[Choosing the runner for a job](/actions/using-jobs/choosing-the-runner-for-a-job)" and "[Using labels with self-hosted runners](/actions/hosting-your-own-runners/using-labels-with-self-hosted-runners)."
|
||||
{% data variables.product.prodname_codeql %} {% data variables.product.prodname_code_scanning %} は、Ubuntu、Windows、および macOS の最新バージョンをサポートしています。 したがって、この設定の一般的な値は、`ubuntu-latest`、`windows-latest`、`macos-latest` です。 詳細については、「[ジョブのランナーを選択する](/actions/using-jobs/choosing-the-runner-for-a-job)」および「[セルフホスト ランナーとのラベルの利用](/actions/hosting-your-own-runners/using-labels-with-self-hosted-runners)」を参照してください。
|
||||
|
||||
{% ifversion ghes %}You must ensure that Git is in the PATH variable on your self-hosted runners.{% else %}If you use a self-hosted runner, you must ensure that Git is in the PATH variable.{% endif %} For more information, see "[About self-hosted runners](/actions/hosting-your-own-runners/about-self-hosted-runners)" and "[Adding self-hosted runners](/actions/hosting-your-own-runners/adding-self-hosted-runners)."
|
||||
{% ifversion ghes %}Git がセルフホスト ランナーの PATH 変数にあることを確認する必要があります。{% else %}セルフホスト ランナーを使用する場合は、Git が PATH 変数内にあることを確認する必要があります。{% endif %}詳細については、「[セルフホスト ランナーについて](/actions/hosting-your-own-runners/about-self-hosted-runners)」および「[セルフホスト ランナーの追加](/actions/hosting-your-own-runners/adding-self-hosted-runners)」を参照してください。
|
||||
|
||||
For recommended specifications (RAM, CPU cores, and disk) for running {% data variables.product.prodname_codeql %} analysis{% ifversion not ghes %} on self-hosted machines{% endif %}, 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)."
|
||||
{% ifversion not ghes %}セルフホスト コンピューターで{% endif %}{% 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)」を参照してください。
|
||||
|
||||
## Specifying the location for {% data variables.product.prodname_codeql %} databases
|
||||
## {% data variables.product.prodname_codeql %}データベースの場所の指定
|
||||
|
||||
In general, you do not need to worry about where the {% data variables.product.prodname_codeql_workflow %} places {% data variables.product.prodname_codeql %} databases since later steps will automatically find databases created by previous steps. However, if you are writing a custom workflow step that requires the {% data variables.product.prodname_codeql %} database to be in a specific disk location, for example to upload the database as a workflow artifact, you can specify that location using the `db-location` parameter under the `init` action.
|
||||
一般に、{% data variables.product.prodname_codeql_workflow %}が{% data variables.product.prodname_codeql %}データベースを置く場所について気にする必要はありません。これは、以前のステップで作成されたデータベースを後のステップは自動的に見つけるからです。 ただし、カスタムのワークフロー ステップを記述していて、{% data variables.product.prodname_codeql %} データベースをワークフロー成果物としてアップロードするなど、そのデータベースが特定のディスクの場所にあることが必要な場合は、`init` アクションの `db-location` パラメーターを使ってその場所を指定できます。
|
||||
|
||||
``` yaml
|
||||
- uses: {% data reusables.actions.action-codeql-action-init %}
|
||||
@@ -190,21 +187,21 @@ In general, you do not need to worry about where the {% data variables.product.p
|
||||
db-location: {% raw %}'${{ github.workspace }}/codeql_dbs'{% endraw %}
|
||||
```
|
||||
|
||||
The {% data variables.product.prodname_codeql_workflow %} will expect the path provided in `db-location` to be writable, and either not exist, or be an empty directory. When using this parameter in a job running on a self-hosted runner or using a Docker container, it's the responsibility of the user to ensure that the chosen directory is cleared between runs, or that the databases are removed once they are no longer needed. {% ifversion fpt or ghec or ghes %} This is not necessary for jobs running on {% data variables.product.prodname_dotcom %}-hosted runners, which obtain a fresh instance and a clean filesystem each time they run. For more information, see "[About {% data variables.product.prodname_dotcom %}-hosted runners](/actions/using-github-hosted-runners/about-github-hosted-runners)."{% endif %}
|
||||
{% data variables.product.prodname_codeql_workflow %} では、`db-location` に指定されるパスが書き込み可能であり、存在しないか空のディレクトリであると想定されています。 セルフホストランナー上で動作するか、Dockerコンテナを使うジョブでこのパラメータを使う場合、選択されたディレクトリが実行間でクリアされること、あるいは不要になったらデータベースが削除されることを保証するのはユーザの責任です。 {% ifversion fpt or ghec or ghes %} これは、実行のたびに新しいインスタンスとクリーンなファイルシステムが取得される {% data variables.product.prodname_dotcom %} ホスト ランナー上で動作するジョブには必要ありません。 詳細については、「[{% data variables.product.prodname_dotcom %} ホスト ランナーの概要](/actions/using-github-hosted-runners/about-github-hosted-runners)」を参照してください。{% endif %}
|
||||
|
||||
If this parameter is not used, the {% data variables.product.prodname_codeql_workflow %} will create databases in a temporary location of its own choice.
|
||||
このパラメータが使われなければ、{% data variables.product.prodname_codeql_workflow %}はデータベースを自分が選択した一時的な場所に作成します。
|
||||
|
||||
## Changing the languages that are analyzed
|
||||
## 解析される言語を変更する
|
||||
|
||||
{% data variables.product.prodname_codeql %} {% data variables.product.prodname_code_scanning %} automatically detects code written in the supported languages.
|
||||
{% data variables.product.prodname_codeql %} {% data variables.product.prodname_code_scanning %}は、自動的にサポートする言語で書かれたコードを検出します。
|
||||
|
||||
{% data reusables.code-scanning.codeql-languages-bullets %}
|
||||
|
||||
The default {% data variables.product.prodname_codeql_workflow %} file contains a matrix called `language` which lists the languages in your repository that are analyzed. {% data variables.product.prodname_codeql %} automatically populates this matrix when you add {% data variables.product.prodname_code_scanning %} to a repository. Using the `language` matrix optimizes {% data variables.product.prodname_codeql %} to run each analysis in parallel. We recommend that all workflows adopt this configuration due to the performance benefits of parallelizing builds. For more information about matrices, see "[Using a matrix for your jobs](/actions/using-jobs/using-a-matrix-for-your-jobs)."
|
||||
既定の {% data variables.product.prodname_codeql_workflow %} ファイルには、`language` という名前のマトリックスが含まれ、リポジトリ内の分析対象の言語がリストされています。 {% data variables.product.prodname_codeql %}は、{% data variables.product.prodname_code_scanning %}がリポジトリに追加されたときにこのマトリクスを自動的に作成します。 `language` マトリックスを使用すると、{% data variables.product.prodname_codeql %} で各解析が並行して実行されるように最適化されます。 ビルドを並列化するとパフォーマンスが向上するため、すべてのワークフローでこの構成を採用することをお勧めします。 マトリックスの詳しい情報については、「[ジョブにマトリックスを使用する](/actions/using-jobs/using-a-matrix-for-your-jobs)」を参照してください。
|
||||
|
||||
{% data reusables.code-scanning.specify-language-to-analyze %}
|
||||
|
||||
If your workflow uses the `language` matrix then {% data variables.product.prodname_codeql %} is hardcoded to analyze only the languages in the matrix. To change the languages you want to analyze, edit the value of the matrix variable. You can remove a language to prevent it being analyzed or you can add a language that was not present in the repository when {% data variables.product.prodname_code_scanning %} was set up. For example, if the repository initially only contained JavaScript when {% data variables.product.prodname_code_scanning %} was set up, and you later added Python code, you will need to add `python` to the matrix.
|
||||
ワークフローで `language` マトリックスを使用する場合、{% data variables.product.prodname_codeql %} はマトリックス内の言語だけを分析するようにハードコードされています。 分析する言語を変更するには、マトリックス変数の値を編集します。 解析されないように言語を削除したり、{% data variables.product.prodname_code_scanning %}をセットアップしたときにはリポジトリ中になかった言語を追加したりできます。 たとえば、{% data variables.product.prodname_code_scanning %} が設定されたとき、リポジトリには当初 JavaScript しか入っておらず、後で Python のコードを追加した場合は、マトリックスに `python` を追加する必要があります。
|
||||
|
||||
```yaml
|
||||
jobs:
|
||||
@@ -217,7 +214,7 @@ jobs:
|
||||
language: ['javascript', 'python']
|
||||
```
|
||||
|
||||
If your workflow does not contain a matrix called `language`, then {% data variables.product.prodname_codeql %} is configured to run analysis sequentially. If you don't specify languages in the workflow, {% data variables.product.prodname_codeql %} automatically detects, and attempts to analyze, any supported languages in the repository. If you want to choose which languages to analyze, without using a matrix, you can use the `languages` parameter under the `init` action.
|
||||
ワークフローに `language` という名前のマトリックスが含まれていない場合は、{% data variables.product.prodname_codeql %} は解析を順次実行するように設定されます。 ワークフロー中で言語を指定していない場合、{% data variables.product.prodname_codeql %}はリポジトリ中のサポートされている言語を検出し、分析しようとします。 マトリックスは使用せず、分析する言語を選択する場合は、`init` アクションの下の `languages` パラメーターを使用できます。
|
||||
|
||||
```yaml
|
||||
- uses: {% data reusables.actions.action-codeql-action-init %}
|
||||
@@ -225,15 +222,15 @@ If your workflow does not contain a matrix called `language`, then {% data varia
|
||||
languages: cpp, csharp, python
|
||||
```
|
||||
{% ifversion fpt or ghec %}
|
||||
## Analyzing Python dependencies
|
||||
## 追加のクエリを実行する
|
||||
|
||||
For GitHub-hosted runners that use Linux only, the {% data variables.product.prodname_codeql_workflow %} will try to auto-install Python dependencies to give more results for the CodeQL analysis. You can control this behavior by specifying the `setup-python-dependencies` parameter for the action called by the "Initialize CodeQL" step. By default, this parameter is set to `true`:
|
||||
Linuxだけを使うGitHubがホストしているランナーでは、{% data variables.product.prodname_codeql_workflow %}はCodeQLの分析にさらなる結果を加えるためにPythonの依存関係を自動的にインストールしようとします。 この動作は、"Initialize CodeQL" ステップで呼び出されるアクションに `setup-python-dependencies` パラメーターを指定することで制御できます。 既定では、このパラメーターは `true` に設定されます。
|
||||
|
||||
- If the repository contains code written in Python, the "Initialize CodeQL" step installs the necessary dependencies on the GitHub-hosted runner. If the auto-install succeeds, the action also sets the environment variable `CODEQL_PYTHON` to the Python executable file that includes the dependencies.
|
||||
- リポジトリがPythonで書かれたコードを含むなら、"Initialize CodeQL"ステップは必要な依存関係をGitHubがホストするランナーにインストールします。 また、自動インストールが成功すると、このアクションによって、環境変数 `CODEQL_PYTHON` が、依存関係が含まれる Python 実行可能ファイルに設定されます。
|
||||
|
||||
- If the repository doesn't have any Python dependencies, or the dependencies are specified in an unexpected way, you'll get a warning and the action will continue with the remaining jobs. The action can run successfully even when there are problems interpreting dependencies, but the results may be incomplete.
|
||||
- リポジトリがPythonの依存関係を持たない場合、あるいは依存関係が予想外の方法で指定されている場合、警告が示されてアクションは残りのジョブを継続します。 依存関係の解釈に問題があってもアクションの実行は成功することがありますが、結果は不完全かも知れません。
|
||||
|
||||
Alternatively, you can install Python dependencies manually on any operating system. You will need to add `setup-python-dependencies` and set it to `false`, as well as set `CODEQL_PYTHON` to the Python executable that includes the dependencies, as shown in this workflow extract:
|
||||
あるいは、任意のオペレーティングシステムにおいて手動でPythonの依存関係をインストールできます。 このワークフローの抜粋に示されるように、`setup-python-dependencies` を追加して `false` に設定し、さらに `CODEQL_PYTHON` を、依存関係が含まれる Python 実行可能ファイルに設定する必要があります。
|
||||
|
||||
```yaml
|
||||
jobs:
|
||||
@@ -269,11 +266,11 @@ jobs:
|
||||
```
|
||||
{% endif %}
|
||||
|
||||
## Configuring a category for the analysis
|
||||
## 分析のカテゴリの設定
|
||||
|
||||
Use `category` to distinguish between multiple analyses for the same tool and commit, but performed on different languages or different parts of the code. The category you specify in your workflow will be included in the SARIF results file.
|
||||
`category` を使用して、同じツールとコミットに対して、異なる言語またはコードの異なる部分に対して実行される複数の解析を区別します。 ワークフロー中で指定したカテゴリは、SARIF結果ファイルに含まれます。
|
||||
|
||||
This parameter is particularly useful if you work with monorepos and have multiple SARIF files for different components of the monorepo.
|
||||
このパラメータは、特に単一リポジトリで作業をしていて、単一リポジトリの様々なコンポーネントに対して複数のSARIFファイルがある場合に有益です。
|
||||
|
||||
``` yaml
|
||||
- name: Perform CodeQL Analysis
|
||||
@@ -285,36 +282,36 @@ This parameter is particularly useful if you work with monorepos and have multip
|
||||
category: "my_category"
|
||||
```
|
||||
|
||||
If you don't specify a `category` parameter in your workflow, {% data variables.product.product_name %} will generate a category name for you, based on the name of the workflow file triggering the action, the action name, and any matrix variables. For example:
|
||||
- The `.github/workflows/codeql-analysis.yml` workflow and the `analyze` action will produce the category `.github/workflows/codeql.yml:analyze`.
|
||||
- The `.github/workflows/codeql-analysis.yml` workflow, the `analyze` action, and the `{language: javascript, os: linux}` matrix variables will produce the category `.github/workflows/codeql-analysis.yml:analyze/language:javascript/os:linux`.
|
||||
ワークフローで `category` パラメーターを指定しない場合、{% data variables.product.product_name %} によって、アクションをトリガーするワークフロー ファイルの名前、アクション名、任意のマトリックス変数に基づいて、カテゴリ名が生成されます。 たとえば次のような点です。
|
||||
- `.github/workflows/codeql-analysis.yml`ワークフローと `analyze` アクションによって、カテゴリ `.github/workflows/codeql.yml:analyze` が生成されます。
|
||||
- `.github/workflows/codeql-analysis.yml` ワークフロー、`analyze` アクション、`{language: javascript, os: linux}` マトリックス変数によって、カテゴリ `.github/workflows/codeql-analysis.yml:analyze/language:javascript/os:linux` が生成されます。
|
||||
|
||||
The `category` value will appear as the `<run>.automationDetails.id` property in SARIF v2.1.0. For more information, see "[SARIF support for {% data variables.product.prodname_code_scanning %}](/code-security/secure-coding/sarif-support-for-code-scanning#runautomationdetails-object)."
|
||||
`category` 値は、SARIF v2.1.0 の `<run>.automationDetails.id` プロパティとして表示されます。 詳細については、「[{% data variables.product.prodname_code_scanning %} の SARIF サポート](/code-security/secure-coding/sarif-support-for-code-scanning#runautomationdetails-object)」を参照してください。
|
||||
|
||||
Your specified category will not overwrite the details of the `runAutomationDetails` object in the SARIF file, if included.
|
||||
指定したカテゴリは、SARIF ファイルに `runAutomationDetails` オブジェクトの詳細が含まれている場合、上書きされることはありません。
|
||||
|
||||
## Running additional queries
|
||||
## 追加のクエリを実行する
|
||||
|
||||
{% data reusables.code-scanning.run-additional-queries %}
|
||||
|
||||
{% ifversion codeql-packs %}
|
||||
### Using {% data variables.product.prodname_codeql %} query packs
|
||||
### {% data variables.product.prodname_codeql %} クエリ パックを使用する
|
||||
|
||||
{% data reusables.code-scanning.beta-codeql-packs-cli %}
|
||||
|
||||
To add one or more {% data variables.product.prodname_codeql %} query packs (beta), add a `with: packs:` entry within the `uses: {% data reusables.actions.action-codeql-action-init %}` section of the workflow. Within `packs` you specify one or more packages to use and, optionally, which version to download. Where you don't specify a version, the latest version is downloaded. If you want to use packages that are not publicly available, you need to set the `GITHUB_TOKEN` environment variable to a secret that has access to the packages. For more information, see "[Authentication in a workflow](/actions/reference/authentication-in-a-workflow)" and "[Encrypted secrets](/actions/reference/encrypted-secrets)."
|
||||
1 つ以上の {% data variables.product.prodname_codeql %} クエリ パック (ベータ版) を追加するには、ワークフローの `uses: {% data reusables.actions.action-codeql-action-init %}` セクション内に `with: packs:` エントリを追加します。 `packs` 内で、使用するパッケージを 1 つ以上指定し、必要に応じて、ダウンロードするバージョンを指定します。 バージョンを指定しない場合は、最新バージョンがダウンロードされます。 公開されていないパッケージを使用する場合は、`GITHUB_TOKEN` 環境変数を、パッケージにアクセスできるシークレットに設定する必要があります。 詳細については、[ワークフローでの認証](/actions/reference/authentication-in-a-workflow)に関するページと「[暗号化されたシークレット](/actions/reference/encrypted-secrets)」を参照してください。
|
||||
|
||||
{% note %}
|
||||
|
||||
**Note:** For workflows that generate {% data variables.product.prodname_codeql %} databases for multiple languages, you must instead specify the {% data variables.product.prodname_codeql %} query packs in a configuration file. For more information, see "[Specifying {% data variables.product.prodname_codeql %} query packs](#specifying-codeql-query-packs)" below.
|
||||
**メモ:** 複数の言語の {% data variables.product.prodname_codeql %} データベースを生成するワークフローでは、構成ファイルで {% data variables.product.prodname_codeql %} クエリ パックを代わりに指定する必要があります。 詳細については、以下の「[{% data variables.product.prodname_codeql %} クエリ パックの指定](#specifying-codeql-query-packs)」を参照してください。
|
||||
|
||||
{% endnote %}
|
||||
|
||||
In the example below, `scope` is the organization or personal account that published the package. When the workflow runs, the four {% data variables.product.prodname_codeql %} query packs are downloaded from {% data variables.product.product_name %} and the default queries or query suite for each pack run:
|
||||
- The latest version of `pack1` is downloaded and all default queries are run.
|
||||
- Version 1.2.3 of `pack2` is downloaded and all default queries are run.
|
||||
- The latest version of `pack3` that is compatible with version 3.2.1 is downloaded and all queries are run.
|
||||
- Version 4.5.6 of `pack4` is downloaded and only the queries found in `path/to/queries` are run.
|
||||
次の例では、`scope` は、パッケージを公開した Organaization または個人アカウントです。 ワークフローを実行すると、4 つの {% data variables.product.prodname_codeql %} クエリ パックが {% data variables.product.product_name %} からダウンロードされ、各パックの既定のクエリまたはクエリ スイートが実行されます。
|
||||
- 最新バージョンの `pack1` がダウンロードされ、すべての既定のクエリが実行されます。
|
||||
- バージョン 1.2.3 の `pack2` がダウンロードされ、すべての既定のクエリが実行されます。
|
||||
- バージョン 3.2.1 と互換性のある最新バージョンの `pack3` がダウンロードされ、すべてのクエリが実行されます。
|
||||
- バージョン 4.5.6 の `pack4` がダウンロードされ、`path/to/queries` 内で見つかったクエリのみが実行されます。
|
||||
|
||||
``` yaml
|
||||
- uses: {% data reusables.actions.action-codeql-action-init %}
|
||||
@@ -323,9 +320,8 @@ In the example below, `scope` is the organization or personal account that publi
|
||||
packs: scope/pack1,scope/pack2@1.2.3,scope/pack3@~3.2.1,scope/pack4@4.5.6:path/to/queries
|
||||
```
|
||||
|
||||
### Using queries in QL packs
|
||||
{% endif %}
|
||||
To add one or more queries, add a `with: queries:` entry within the `uses: {% data reusables.actions.action-codeql-action-init %}` section of the workflow. If the queries are in a private repository, use the `external-repository-token` parameter to specify a token that has access to checkout the private repository.
|
||||
### QL パックでクエリを使用する
|
||||
{% endif %} 1 つ以上のクエリを追加するには、ワークフローの `uses: {% data reusables.actions.action-codeql-action-init %}` セクション内に `with: queries:` エントリを追加します。 クエリがプライベート リポジトリ内にある場合は、`external-repository-token` パラメーターを使用して、プライベート リポジトリをチェックアウトするためのアクセス権を持つトークンを指定します。
|
||||
|
||||
``` yaml
|
||||
- uses: {% data reusables.actions.action-codeql-action-init %}
|
||||
@@ -335,17 +331,17 @@ To add one or more queries, add a `with: queries:` entry within the `uses: {% da
|
||||
external-repository-token: {% raw %}${{ secrets.ACCESS_TOKEN }}{% endraw %}
|
||||
```
|
||||
|
||||
You can also specify query suites in the value of `queries`. Query suites are collections of queries, usually grouped by purpose or language.
|
||||
`queries` の値でクエリ スイートを指定することもできます。 クエリ スイートは、通常、目的または言語別にグループ化されたクエリのコレクションです。
|
||||
|
||||
{% data reusables.code-scanning.codeql-query-suites-explanation %}
|
||||
|
||||
{% ifversion codeql-packs %}
|
||||
### Working with custom configuration files
|
||||
### カスタム構成ファイルの処理
|
||||
{% endif %}
|
||||
|
||||
If you also use a configuration file for custom settings, any additional {% ifversion codeql-packs %}packs or {% endif %}queries specified in your workflow are used instead of those specified in the configuration file. If you want to run the combined set of additional {% ifversion codeql-packs %}packs or {% endif %}queries, prefix the value of {% ifversion codeql-packs %}`packs` or {% endif %}`queries` in the workflow with the `+` symbol. For more information, see "[Using a custom configuration file](#using-a-custom-configuration-file)."
|
||||
カスタム設定にも構成ファイルを使用する場合、構成ファイル内に指定されているものではなく、ワークフロー内で指定した追加の{% ifversion codeql-packs %}パックまたは{% endif %}クエリが使用されます。 追加の{% ifversion codeql-packs %}パックまたは{% endif %}クエリの組み合わせセットを実行する場合は、ワークフロー内の {% ifversion codeql-packs %}`packs` または {% endif %}`queries` の値の前に `+` 記号を付けます。 詳細については、「[カスタム構成の使用](#using-a-custom-configuration-file)」を参照してください。
|
||||
|
||||
In the following example, the `+` symbol ensures that the specified additional {% ifversion codeql-packs %}packs and {% endif %}queries are used together with any specified in the referenced configuration file.
|
||||
次の例では、`+` 記号を付けることで、指定した追加の{% ifversion codeql-packs %}パックと{% endif %}クエリが、参照される構成ファイル内で指定したものと一緒に確実に使用されます。
|
||||
|
||||
``` yaml
|
||||
- uses: {% data reusables.actions.action-codeql-action-init %}
|
||||
@@ -357,11 +353,11 @@ In the following example, the `+` symbol ensures that the specified additional {
|
||||
{%- endif %}
|
||||
```
|
||||
|
||||
## Using a custom configuration file
|
||||
## カスタム構成ファイルの使用
|
||||
|
||||
A custom configuration file is an alternative way to specify additional {% ifversion codeql-packs %}packs and {% endif %}queries to run. You can also use the file to disable the default queries{% ifversion code-scanning-exclude-queries-from-analysis %}, exclude or include specific queries,{% endif %} and to specify which directories to scan during analysis.
|
||||
カスタム構成ファイルは、実行する追加の{% ifversion codeql-packs %}パックと{% endif %}クエリを指定するための代替方法です。 また、このファイルを使用することで、既定のクエリ {% ifversion code-scanning-exclude-queries-from-analysis %} を無効にしたり、特定のクエリを除外または含めたり、{% endif %} 分析中にスキャンするディレクトリを指定したりすることもできます。
|
||||
|
||||
In the workflow file, use the `config-file` parameter of the `init` action to specify the path to the configuration file you want to use. This example loads the configuration file _./.github/codeql/codeql-config.yml_.
|
||||
ワークフロー ファイルでは、`init` アクションの `config-file` パラメーターを使用して、使用する構成ファイルへのパスを指定します。 この例では、構成ファイル _./.github/codeql/codeql-config.yml_ を読み込みます。
|
||||
|
||||
``` yaml
|
||||
- uses: {% data reusables.actions.action-codeql-action-init %}
|
||||
@@ -371,7 +367,7 @@ In the workflow file, use the `config-file` parameter of the `init` action to sp
|
||||
|
||||
{% data reusables.code-scanning.custom-configuration-file %}
|
||||
|
||||
If the configuration file is located in an external private repository, use the `external-repository-token` parameter of the `init` action to specify a token that has access to the private repository.
|
||||
構成ファイルが外部のプライベート リポジトリにある場合は、`init` アクションの `external-repository-token` パラメーターを使用して、そのプライベート リポジトリへのアクセス権を持つトークンを指定します。
|
||||
|
||||
```yaml
|
||||
- uses: {% data reusables.actions.action-codeql-action-init %}
|
||||
@@ -379,14 +375,14 @@ If the configuration file is located in an external private repository, use the
|
||||
external-repository-token: {% raw %}${{ secrets.ACCESS_TOKEN }}{% endraw %}
|
||||
```
|
||||
|
||||
The settings in the configuration file are written in YAML format.
|
||||
構成ファイルの設定は、YAML 形式で記述します。
|
||||
|
||||
{% ifversion codeql-packs %}
|
||||
### Specifying {% data variables.product.prodname_codeql %} query packs
|
||||
### {% data variables.product.prodname_codeql %} クエリ パックを指定する
|
||||
|
||||
{% data reusables.code-scanning.beta-codeql-packs-cli %}
|
||||
|
||||
You specify {% data variables.product.prodname_codeql %} query packs in an array. Note that the format is different from the format used by the workflow file.
|
||||
配列に {% data variables.product.prodname_codeql %} クエリ パックを指定します。 形式は、ワークフロー ファイルで使用される形式とは異なるので注意してください。
|
||||
|
||||
{% raw %}
|
||||
``` yaml
|
||||
@@ -406,9 +402,9 @@ packs:
|
||||
```
|
||||
{% endraw %}
|
||||
|
||||
The full format for specifying a query pack is `scope/name[@version][:path]`. Both `version` and `path` are optional. `version` is semver version range. If it is missing, the latest version is used. For more information about semver ranges, see the [semver docs on npm](https://docs.npmjs.com/cli/v6/using-npm/semver#ranges).
|
||||
クエリ パックを指定する完全な書式は `scope/name[@version][:path]` です。 `version` と `path` はどちらも省略可能です。 `version` は semver バージョンの範囲です。 指定しない場合は、最新バージョンが使われます。 semver の範囲の詳細については、[npm の semver ドキュメント](https://docs.npmjs.com/cli/v6/using-npm/semver#ranges)を参照してください。
|
||||
|
||||
If you have a workflow that generates more than one {% data variables.product.prodname_codeql %} database, you can specify any {% data variables.product.prodname_codeql %} query packs to run in a custom configuration file using a nested map of packs.
|
||||
複数の {% data variables.product.prodname_codeql %} データベースを生成するワークフローがある場合、入れ子になったパックのマップを使用して、カスタム構成ファイル内に、実行する任意の {% data variables.product.prodname_codeql %} クエリ パックを指定できます。
|
||||
|
||||
{% raw %}
|
||||
``` yaml
|
||||
@@ -422,12 +418,11 @@ packs:
|
||||
- scope/java-pack1
|
||||
- scope/java-pack2@v1.0.0
|
||||
```
|
||||
{% endraw %}
|
||||
{% endif %}
|
||||
{% endraw %} {% endif %}
|
||||
|
||||
### Specifying additional queries
|
||||
### 追加のクエリを指定する
|
||||
|
||||
You specify additional queries in a `queries` array. Each element of the array contains a `uses` parameter with a value that identifies a single query file, a directory containing query files, or a query suite definition file.
|
||||
追加のクエリは `queries` 配列に指定します。 配列の各要素に、単一のクエリ ファイル、クエリ ファイルを含むディレクトリ、またはクエリ スイート定義ファイルを識別する値を持つ `uses`パラメーターを含めます。
|
||||
|
||||
``` yaml
|
||||
queries:
|
||||
@@ -436,23 +431,23 @@ queries:
|
||||
- uses: ./query-suites/my-security-queries.qls
|
||||
```
|
||||
|
||||
Optionally, you can give each array element a name, as shown in the example configuration files below. For more information about additional queries, see "[Running additional queries](#running-additional-queries)" above.
|
||||
あるいは、以下の設定ファイルの例にあるように、配列の各要素に名前を与えることもできます。 追加のクエリの詳細については、前述の「[追加のクエリを実行する](#running-additional-queries)」を参照してください。
|
||||
|
||||
### Disabling the default queries
|
||||
### デフォルトのクエリを無効にする
|
||||
|
||||
If you only want to run custom queries, you can disable the default security queries by using `disable-default-queries: true`.
|
||||
カスタム クエリのみを実行する場合は、`disable-default-queries: true` を使用して既定のセキュリティ クエリを無効にすることができます。
|
||||
|
||||
{% ifversion code-scanning-exclude-queries-from-analysis %}
|
||||
### Excluding specific queries from analysis
|
||||
### 分析からの特定のクエリの除外
|
||||
|
||||
You can add `exclude` and `include` filters to your custom configuration file, to specify the queries you want to exclude or include in the analysis.
|
||||
カスタム構成ファイルに `exclude` および `include` フィルターを追加して、分析から除外また分析に含めるクエリを指定できます。
|
||||
|
||||
This is useful if you want to exclude, for example:
|
||||
- Specific queries from the default suites (`security`, `security-extended` and `security-and-quality`).
|
||||
- Specific queries whose results do not interest you.
|
||||
- All the queries that generate warnings and recommendations.
|
||||
たとえば、これは、次のように除外する場合に便利です。
|
||||
- 既定のスイート (`security`、`security-extended`、および `security-and-quality`) からの特定のクエリ。
|
||||
- 結果に関心がない特定のクエリ。
|
||||
- 警告と推奨事項を生成するすべてのクエリ。
|
||||
|
||||
You can use `exclude` filters similar to those in the configuration file below to exclude queries that you want to remove from the default analysis. In the example of configuration file below, both the `js/redundant-assignment` and the `js/useless-assignment-to-local` queries are excluded from analysis.
|
||||
以下の構成ファイルと同様の `exclude` フィルターを使用して、既定の分析から削除するクエリを除外できます。 次の構成ファイルの例では、`js/redundant-assignment` および `js/useless-assignment-to-local` クエリの両方が分析から除外されています。
|
||||
|
||||
```yaml
|
||||
query-filters:
|
||||
@@ -461,25 +456,25 @@ query-filters:
|
||||
- exclude:
|
||||
id: js/useless-assignment-to-local
|
||||
```
|
||||
To find the id of a query, you can click the alert in the list of alerts in the Security tab. This opens the alert details page. The `Rule ID` field contains the query id. For more information about the alert details page, 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-alert-details)."
|
||||
クエリの ID を見つけるには、[セキュリティ] タブのアラートの一覧でアラートをクリックします。これにより、アラートの詳しい内容を示すページが開きます。 フィールドには `Rule ID` クエリ ID が含まれています。アラートの詳細ページについて詳しくは、「[{% data variables.product.prodname_code_scanning %} アラートについて](/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/about-code-scanning-alerts#about-alert-details)」を参照してください。
|
||||
|
||||
{% tip %}
|
||||
|
||||
**Tips:**
|
||||
- The order of the filters is important. The first filter instruction that appears after the instructions about the queries and query packs determines whether the queries are included or excluded by default.
|
||||
- Subsequent instructions are executed in order and the instructions that appear later in the file take precedence over the earlier instructions.
|
||||
**ヒント:**
|
||||
- フィルターの順序が重要です。 クエリとクエリ パックに関する命令の後に表示される最初のフィルター命令によって、既定でクエリを含めるか除外するかが決まります。
|
||||
- 後続の命令は順番に実行され、ファイル内で後にある命令の方が前にある命令よりも優先されます。
|
||||
|
||||
{% endtip %}
|
||||
|
||||
You can find another example illustrating the use of these filters in the "[Example configuration files](#example-configuration-files)" section.
|
||||
これらのフィルターの使用方法を示す別の例については、「[サンプル構成ファイル](#example-configuration-files)」セクションを参照してください。
|
||||
|
||||
For more information about using `exclude` and `include` filters in your custom configuration file, see "[Creating {% data variables.product.prodname_codeql %} query suites](https://codeql.github.com/docs/codeql-cli/creating-codeql-query-suites/#filtering-the-queries-in-a-query-suite)." For information on the query metadata you can filter on, see "[Metadata for CodeQL queries](https://codeql.github.com/docs/writing-codeql-queries/metadata-for-codeql-queries/)."
|
||||
カスタム構成ファイルでの `exclude` および `include` フィルターの使用について詳しくは、「[{% data variables.product.prodname_codeql %} クエリ スイートの作成](https://codeql.github.com/docs/codeql-cli/creating-codeql-query-suites/#filtering-the-queries-in-a-query-suite)」を参照してください。 フィルター処理できるクエリ メタデータについて詳しくは、「[CodeQL クエリのメタデータ](https://codeql.github.com/docs/writing-codeql-queries/metadata-for-codeql-queries/)」を参照してください。
|
||||
|
||||
{% endif %}
|
||||
|
||||
### Specifying directories to scan
|
||||
### スキャンするディレクトリを指定する
|
||||
|
||||
For the interpreted languages that {% data variables.product.prodname_codeql %} supports (Python{% ifversion fpt or ghes > 3.3 or ghae-issue-5017 %}, Ruby{% endif %} and JavaScript/TypeScript), you can restrict {% data variables.product.prodname_code_scanning %} to files in specific directories by adding a `paths` array to the configuration file. You can exclude the files in specific directories from analysis by adding a `paths-ignore` array.
|
||||
{% data variables.product.prodname_codeql %} がサポートするインタプリタ型言語 (Python{% ifversion fpt or ghes > 3.3 or ghae-issue-5017 %}、Ruby{% endif %}、JavaScript/TypeScript) では、構成ファイルに `paths` 配列を追加することで、{% data variables.product.prodname_code_scanning %} を特定のディレクトリのファイルに限定できます。 `paths-ignore` 配列を追加すると、特定のディレクトリ内のファイルを分析から除外できます。
|
||||
|
||||
``` yaml
|
||||
paths:
|
||||
@@ -491,28 +486,28 @@ paths-ignore:
|
||||
|
||||
{% note %}
|
||||
|
||||
**Note**:
|
||||
**注**:
|
||||
|
||||
* The `paths` and `paths-ignore` keywords, used in the context of the {% data variables.product.prodname_code_scanning %} configuration file, should not be confused with the same keywords when used for `on.<push|pull_request>.paths` in a workflow. When they are used to modify `on.<push|pull_request>` in a workflow, they determine whether the actions will be run when someone modifies code in the specified directories. For more information, see "[Workflow syntax for {% data variables.product.prodname_actions %}](/actions/reference/workflow-syntax-for-github-actions#onpushpull_requestpull_request_targetpathspaths-ignore)."
|
||||
* The filter pattern characters `?`, `+`, `[`, `]`, and `!` are not supported and will be matched literally.
|
||||
* `**` characters can only be at the start or end of a line, or surrounded by slashes, and you can't mix `**` and other characters. For example, `foo/**`, `**/foo`, and `foo/**/bar` are all allowed syntax, but `**foo` isn't. However you can use single stars along with other characters, as shown in the example. You'll need to quote anything that contains a `*` character.
|
||||
* {% data variables.product.prodname_code_scanning %} 構成ファイルのコンテキストで使用される `paths` および `paths-ignore` キーワードを、ワークフローの `on.<push|pull_request>.paths` で使用する同じキーワードと混同しないでください。 これらをワークフロー内の `on.<push|pull_request>` の変更に使用すると、指定されたディレクトリ内のコードが変更されたときにアクションを実行するかどうかが決定されます。 詳細については、[{% data variables.product.prodname_actions %} のワークフロー構文](/actions/reference/workflow-syntax-for-github-actions#onpushpull_requestpull_request_targetpathspaths-ignore)に関するページを参照してください。
|
||||
* フィルター パターン文字 `?`、`+`、`[`、`]`、`!` はサポートされていないため、文字どおりに照合されます。
|
||||
* `**` 文字は、行の先頭または末尾にのみ指定するか、スラッシュで囲むことができます。また、`**` と他の文字を一緒に使用できます。 たとえば `foo/**`、`**/foo`、`foo/**/bar` は、すべて許容される構文ですが、`**foo` は許容されません。 ただし、例に示すように、1 つの星印を他の文字と一緒に使用できます。 `*` 文字を含むものはすべて引用符で囲む必要があります。
|
||||
|
||||
{% endnote %}
|
||||
|
||||
For compiled languages, if you want to limit {% data variables.product.prodname_code_scanning %} to specific directories in your project, you must specify appropriate build steps in the workflow. The commands you need to use to exclude a directory from the build will depend on your build system. For more information, see "[Configuring the {% data variables.product.prodname_codeql %} workflow for compiled languages](/code-security/secure-coding/configuring-the-codeql-workflow-for-compiled-languages#adding-build-steps-for-a-compiled-language)."
|
||||
コンパイル言語の場合、プロジェクト中の特定のディレクトリに{% data variables.product.prodname_code_scanning %}を限定したいなら、ワークフロー中で適切なビルドステップを指定しなければなりません。 ビルドからディレクトリを除外するために使用するコマンドは、ビルド システムによって異なります。 詳細については、「[コンパイル型言語の {% data variables.product.prodname_codeql %} ワークフローの構成](/code-security/secure-coding/configuring-the-codeql-workflow-for-compiled-languages#adding-build-steps-for-a-compiled-language)」を参照してください。
|
||||
|
||||
You can quickly analyze small portions of a monorepo when you modify code in specific directories. You'll need to both exclude directories in your build steps and use the `paths-ignore` and `paths` keywords for [`on.<push|pull_request>`](/actions/reference/workflow-syntax-for-github-actions#onpushpull_requestpull_request_targetpathspaths-ignore) in your workflow.
|
||||
特定のディレクトリ内のコードを変更した場合、モノリポの小さな部分をすばやく分析できます。 ビルド ステップでディレクトリを除外することと、ワークフローで [`on.<push|pull_request>`](/actions/reference/workflow-syntax-for-github-actions#onpushpull_requestpull_request_targetpathspaths-ignore) の `paths-ignore` および `paths` キーワードを使用することの両方が必要になります。
|
||||
|
||||
### Example configuration files
|
||||
### サンプル構成ファイル
|
||||
|
||||
{% data reusables.code-scanning.example-configuration-files %}
|
||||
|
||||
## Configuring {% data variables.product.prodname_code_scanning %} for compiled languages
|
||||
## コンパイルされた言語の {% data variables.product.prodname_code_scanning %} を設定する
|
||||
|
||||
{% data reusables.code-scanning.autobuild-compiled-languages %} {% data reusables.code-scanning.analyze-go %}
|
||||
|
||||
{% data reusables.code-scanning.autobuild-add-build-steps %} For more information about how to configure {% data variables.product.prodname_codeql %} {% data variables.product.prodname_code_scanning %} for compiled languages, see "[Configuring the {% data variables.product.prodname_codeql %} workflow for compiled languages](/code-security/secure-coding/configuring-the-codeql-workflow-for-compiled-languages)."
|
||||
{% data reusables.code-scanning.autobuild-add-build-steps %} コンパイル型言語の {% data variables.product.prodname_codeql %} {% data variables.product.prodname_code_scanning %} を構成する方法の詳細については、「[コンパイル型言語の {% data variables.product.prodname_codeql %} ワークフローの構成](/code-security/secure-coding/configuring-the-codeql-workflow-for-compiled-languages)」を参照してください。
|
||||
|
||||
## Uploading {% data variables.product.prodname_code_scanning %} data to {% data variables.product.prodname_dotcom %}
|
||||
## {% data variables.product.prodname_code_scanning %} データを {% data variables.product.prodname_dotcom %} にアップロードする
|
||||
|
||||
{% data variables.product.prodname_dotcom %} can display code analysis data generated externally by a third-party tool. You can upload code analysis data with the `upload-sarif` action. For more information, see "[Uploading a SARIF file to GitHub](/code-security/secure-coding/uploading-a-sarif-file-to-github)."
|
||||
{% data variables.product.prodname_dotcom %}は、サードパーティのツールによって外部で生成されたコード分析データを表示できます。 `upload-sarif` アクションを使用してコード分析データをアップロードできます。 詳細については、「[SARIF ファイルを GitHub にアップロードする](/code-security/secure-coding/uploading-a-sarif-file-to-github)」を参照してください。
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
---
|
||||
title: Configuring CodeQL CLI in your CI system
|
||||
title: CIシステムでのCodeQL CLIの設定
|
||||
shortTitle: Configure CodeQL CLI
|
||||
intro: 'You can configure your continuous integration system to run the {% data variables.product.prodname_codeql_cli %}, perform {% data variables.product.prodname_codeql %} analysis, and upload the results to {% data variables.product.product_name %} for display as {% data variables.product.prodname_code_scanning %} alerts.'
|
||||
intro: '継続的インテグレーションシステムを{% data variables.product.prodname_codeql_cli %}を実行するように設定し、{% data variables.product.prodname_codeql %}分析を行い、{% data variables.product.prodname_code_scanning %}アラートとして表示させるために結果を{% data variables.product.product_name %}にアップロードできます。'
|
||||
product: '{% data reusables.gated-features.code-scanning %}'
|
||||
miniTocMaxHeadingLevel: 3
|
||||
redirect_from:
|
||||
@@ -21,40 +21,44 @@ topics:
|
||||
- Integration
|
||||
- CI
|
||||
- SARIF
|
||||
ms.openlocfilehash: b78bf0134b9e1c7b786fe70b0ed7999fffd58e1c
|
||||
ms.sourcegitcommit: 478f2931167988096ae6478a257f492ecaa11794
|
||||
ms.translationtype: HT
|
||||
ms.contentlocale: ja-JP
|
||||
ms.lasthandoff: 09/09/2022
|
||||
ms.locfileid: '147718038'
|
||||
---
|
||||
{% data reusables.code-scanning.enterprise-enable-code-scanning %}
|
||||
|
||||
{% ifversion ghes or ghae %}
|
||||
{% note %}
|
||||
{% ifversion ghes or ghae %} {% note %}
|
||||
|
||||
**Note:** This article describes features present in the version of {% data variables.product.prodname_codeql_cli %} available at the time of the release of {% data variables.product.product_name %}. If your enterprise uses a more recent version of {% data variables.product.prodname_codeql_cli %}, see the [{% data variables.product.prodname_ghe_cloud %} documentation](/enterprise-cloud@latest/code-security/code-scanning/using-codeql-code-scanning-with-your-existing-ci-system/configuring-codeql-cli-in-your-ci-system) instead.
|
||||
**注:** この記事では、{% data variables.product.product_name %} のリリース時に使用可能なバージョンの {% data variables.product.prodname_codeql_cli %}に存在する機能について説明します。 Enterprise でより新しいバージョンの {% data variables.product.prodname_codeql_cli %} を使用している場合は、代わりに [{% data variables.product.prodname_ghe_cloud %} のドキュメント](/enterprise-cloud@latest/code-security/code-scanning/using-codeql-code-scanning-with-your-existing-ci-system/configuring-codeql-cli-in-your-ci-system)を参照してください。
|
||||
|
||||
{% endnote %}
|
||||
{% endif %}
|
||||
{% endnote %} {% endif %}
|
||||
|
||||
## About generating code scanning results with {% data variables.product.prodname_codeql_cli %}
|
||||
## {% data variables.product.prodname_codeql_cli %}でのCode scanningの結果の生成について
|
||||
|
||||
Once you've made the {% data variables.product.prodname_codeql_cli %} available to servers in your CI system, and ensured that they can authenticate with {% data variables.product.product_name %}, you're ready to generate data.
|
||||
CIシステム内のサーバーで{% data variables.product.prodname_codeql_cli %}を利用できるようにして、確実に{% data variables.product.product_name %}で認証できるようにしたなら、データを生成する準備ができています。
|
||||
|
||||
You use three different commands to generate results and upload them to {% data variables.product.product_name %}:
|
||||
結果を生成して{% data variables.product.product_name %}にアップロードするには、3つの異なるコマンドを使います。
|
||||
|
||||
<!--Option to analyze multiple languages with one call-->
|
||||
1. `database create` to create a {% data variables.product.prodname_codeql %} database to represent the hierarchical structure of each supported programming language in the repository.
|
||||
2. ` database analyze` to run queries to analyze each {% data variables.product.prodname_codeql %} database and summarize the results in a SARIF file.
|
||||
3. `github upload-results` to upload the resulting SARIF files to {% data variables.product.product_name %} where the results are matched to a branch or pull request and displayed as {% data variables.product.prodname_code_scanning %} alerts.
|
||||
1. `database create` では、リポジトリのサポートされている各プログラミング言語の階層構造を表すために {% data variables.product.prodname_codeql %} データベースを作成します。
|
||||
2. ` database analyze` では、クエリを実行して各 {% data variables.product.prodname_codeql %} データベースを分析し、結果を SARIF ファイルにまとめます。
|
||||
3. `github upload-results` では、結果の SARIF ファイルを {% data variables.product.product_name %} にアップロードします。そこで結果はブランチまたは pull request と照合され、{% data variables.product.prodname_code_scanning %} アラートとして表示されます。
|
||||
|
||||
You can display the command-line help for any command using the <nobr>`--help`</nobr> option.
|
||||
<nobr>`--help`</nobr> オプションを使用して、任意のコマンドのコマンドライン ヘルプを表示できます。
|
||||
|
||||
{% data reusables.code-scanning.upload-sarif-ghas %}
|
||||
|
||||
## Creating {% data variables.product.prodname_codeql %} databases to analyze
|
||||
## 分析する{% data variables.product.prodname_codeql %}データベースの作成
|
||||
|
||||
1. Check out the code that you want to analyze:
|
||||
- For a branch, check out the head of the branch that you want to analyze.
|
||||
- For a pull request, check out either the head commit of the pull request, or check out a {% data variables.product.prodname_dotcom %}-generated merge commit of the pull request.
|
||||
2. Set up the environment for the codebase, making sure that any dependencies are available. For more information, see [Creating databases for non-compiled languages](https://codeql.github.com/docs/codeql-cli/creating-codeql-databases/#creating-databases-for-non-compiled-languages) and [Creating databases for compiled languages](https://codeql.github.com/docs/codeql-cli/creating-codeql-databases/#creating-databases-for-compiled-languages) in the documentation for the {% data variables.product.prodname_codeql_cli %}.
|
||||
3. Find the build command, if any, for the codebase. Typically this is available in a configuration file in the CI system.
|
||||
4. Run `codeql database create` from the checkout root of your repository and build the codebase.
|
||||
1. 分析するコードをチェックアウトします。
|
||||
- ブランチの場合は、分析するブランチのヘッドをチェックアウトします。
|
||||
- pull request の場合は、pull request のヘッド コミットをチェックアウトするか、{% data variables.product.prodname_dotcom %} で生成された pull request のマージ コミットをチェックアウトします。
|
||||
2. コードベースの環境を設定し、依存関係が使用可能であることを確認します。 詳細については、{% data variables.product.prodname_codeql_cli %} のドキュメントの「[コンパイルされていない言語のデータベースの作成](https://codeql.github.com/docs/codeql-cli/creating-codeql-databases/#creating-databases-for-non-compiled-languages)」および [「コンパイル済み言語のデータベースの作成](https://codeql.github.com/docs/codeql-cli/creating-codeql-databases/#creating-databases-for-compiled-languages)」を参照してください。
|
||||
3. コードベースのビルド コマンドを見つけます (ある場合)。 通常、これは CI システムの構成ファイルで使用できます。
|
||||
4. リポジトリのチェックアウト ルートから `codeql database create` を実行し、コードベースをビルドします。
|
||||
|
||||
```shell
|
||||
# Single supported language - create one CodeQL databsae
|
||||
@@ -67,25 +71,25 @@ You can display the command-line help for any command using the <nobr>`--help`</
|
||||
|
||||
{% note %}
|
||||
|
||||
**Note:** If you use a containerized build, you need to run the {% data variables.product.prodname_codeql_cli %} inside the container where your build task takes place.
|
||||
**注:** コンテナー化されたビルドを使用する場合は、ビルド タスクが行われるコンテナーで {% data variables.product.prodname_codeql_cli %} を実行する必要があります。
|
||||
|
||||
{% endnote %}
|
||||
|
||||
| Option | Required | Usage |
|
||||
| オプション | 必須 | 使用法 |
|
||||
|--------|:--------:|-----|
|
||||
| `<database>` | {% octicon "check-circle-fill" aria-label="Required" %} | Specify the name and location of a directory to create for the {% data variables.product.prodname_codeql %} database. The command will fail if you try to overwrite an existing directory. If you also specify `--db-cluster`, this is the parent directory and a subdirectory is created for each language analyzed.|
|
||||
| <nobr>`--language`</nobr> | {% octicon "check-circle-fill" aria-label="Required" %} | Specify the identifier for the language to create a database for, one of: `{% data reusables.code-scanning.codeql-languages-keywords %}` (use `javascript` to analyze TypeScript code). When used with <nobr>`--db-cluster`</nobr>, the option accepts a comma-separated list, or can be specified more than once.
|
||||
| <nobr>`--command`</nobr> | | Recommended. Use to specify the build command or script that invokes the build process for the codebase. Commands are run from the current folder or, where it is defined, from <nobr>`--source-root`</nobr>. Not needed for Python and JavaScript/TypeScript analysis. |
|
||||
| <nobr>`--db-cluster`</nobr> | | Optional. Use in multi-language codebases to generate one database for each language specified by <nobr>`--language`</nobr>.
|
||||
| <nobr>`--no-run-unnecessary-builds`</nobr> | | Recommended. Use to suppress the build command for languages where the {% data variables.product.prodname_codeql_cli %} does not need to monitor the build (for example, Python and JavaScript/TypeScript).
|
||||
| <nobr>`--source-root`</nobr> | | Optional. Use if you run the CLI outside the checkout root of the repository. By default, the `database create` command assumes that the current directory is the root directory for the source files, use this option to specify a different location. |{% ifversion fpt or ghec or ghes > 3.2 or ghae %}
|
||||
| <nobr>`--codescanning-config`</nobr> | | Optional (Advanced). Use if you have a configuration file that specifies how to create the {% data variables.product.prodname_codeql %} databases and what queries to run in later steps. For more information, see "[Using a custom configuration file](/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-a-custom-configuration-file)" and "[database create](https://codeql.github.com/docs/codeql-cli/manual/database-create/#cmdoption-codeql-database-create-codescanning-config)." |{% endif %}
|
||||
| `<database>` | {% octicon "check-circle-fill" aria-label="Required" %} | {% data variables.product.prodname_codeql %}データベースを作成するディレクトリの名前と場所を指定します。 既存のディレクトリを上書きしようとすると、コマンドは失敗します。 また `--db-cluster` を指定した場合は、これが親ディレクトリであり、分析される言語ごとにサブディレクトリが作成されます。|
|
||||
| <nobr>`--language`</nobr> | {% octicon "check-circle-fill" aria-label="Required" %} | データベースを作成する言語の識別子 (`{% data reusables.code-scanning.codeql-languages-keywords %}` のいずれか) を指定します (TypeScript コードを分析するには `javascript` を使用します)。 <nobr>`--db-cluster`</nobr> と一緒に使用する場合は、オプションでコンマ区切りリストが受け入れられるか、複数指定できます。
|
||||
| <nobr>`--command`</nobr> | | 推奨。 コードベースのビルド プロセスを呼び出すビルド コマンドまたはスクリプトを指定するために使用します。 コマンドは現在のフォルダーから、または定義されている場合は <nobr>`--source-root`</nobr> から実行されます。 Python および JavaScript または TypeScript の分析には不要です。 |
|
||||
| <nobr>`--db-cluster`</nobr> | | 省略可能。 <nobr>`--language`</nobr> によって指定された言語ごとに 1 つのデータベースを生成するには、複数言語コードベースを使用します。
|
||||
| <nobr>`--no-run-unnecessary-builds`</nobr> | | 推奨。 {% data variables.product.prodname_codeql_cli %}がビルドをモニターする必要がない場合に、言語のビルドコマンドを抑制するために使います(たとえばPythonやJavaScript/TypeScript)。
|
||||
| <nobr>`--source-root`</nobr> | | 省略可能。 リポジトリのチェックアウト ルートの外部で CLI を実行する場合に使用します。 既定では、`database create` コマンドで現在のディレクトリがソース ファイルのルート ディレクトリであると見なされます。別の場所を指定するためにこのオプションを使用します。 |{% ifversion fpt or ghec or ghes > 3.2 or ghae %}
|
||||
| <nobr>`--codescanning-config`</nobr> | | 省略可能 (詳細) {% data variables.product.prodname_codeql %} データベースの作成方法と、後の手順で実行するクエリを指定する構成ファイルがある場合に使用します。 詳しくは、「[カスタム構成ファイルの使用](/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-a-custom-configuration-file)」および「[database create](https://codeql.github.com/docs/codeql-cli/manual/database-create/#cmdoption-codeql-database-create-codescanning-config)」を参照してください。 |{% endif %}
|
||||
|
||||
For more information, see [Creating {% data variables.product.prodname_codeql %} databases](https://codeql.github.com/docs/codeql-cli/creating-codeql-databases/) in the documentation for the {% data variables.product.prodname_codeql_cli %}.
|
||||
詳細については、{% data variables.product.prodname_codeql_cli %} のドキュメントの「[{% data variables.product.prodname_codeql %} データベースの作成](https://codeql.github.com/docs/codeql-cli/creating-codeql-databases/)」を参照してください。
|
||||
|
||||
### Single language example
|
||||
### 単一言語の例
|
||||
|
||||
This example creates a {% data variables.product.prodname_codeql %} database for the repository checked out at `/checkouts/example-repo`. It uses the JavaScript extractor to create a hierarchical representation of the JavaScript and TypeScript code in the repository. The resulting database is stored in `/codeql-dbs/example-repo`.
|
||||
この例では、`/checkouts/example-repo` でチェックアウトされたリポジトリの {% data variables.product.prodname_codeql %} データベースを作成します。 JavaScript 抽出機能を使用して、リポジトリに JavaScript および TypeScript コードの階層表現を作成します。 結果のデータベースは `/codeql-dbs/example-repo` に格納されます。
|
||||
|
||||
```
|
||||
$ codeql database create /codeql-dbs/example-repo --language=javascript \
|
||||
@@ -101,16 +105,16 @@ $ codeql database create /codeql-dbs/example-repo --language=javascript \
|
||||
> Successfully created database at /codeql-dbs/example-repo.
|
||||
```
|
||||
|
||||
### Multiple language example
|
||||
### 複数言語の例
|
||||
|
||||
This example creates two {% data variables.product.prodname_codeql %} databases for the repository checked out at `/checkouts/example-repo-multi`. It uses:
|
||||
この例では、`/checkouts/example-repo-multi` でチェックアウトされたリポジトリの {% data variables.product.prodname_codeql %} データベースを 2 つ作成します。 イベント プロセッサで使用されるものは次のとおりです。
|
||||
|
||||
- `--db-cluster` to request analysis of more than one language.
|
||||
- `--language` to specify which languages to create databases for.
|
||||
- `--command` to tell the tool the build command for the codebase, here `make`.
|
||||
- `--no-run-unnecessary-builds` to tell the tool to skip the build command for languages where it is not needed (like Python).
|
||||
- `--db-cluster`: 複数の言語の分析を要求します。
|
||||
- `--language`: データベースを作成する言語を指定します。
|
||||
- `--command`: コードベースのビルド コマンド (ここでは `make`) をツールに伝えます。
|
||||
- `--no-run-unnecessary-builds`: 必要のない言語 (Python など) のビルド コマンドをスキップするようにツールに伝えます。
|
||||
|
||||
The resulting databases are stored in `python` and `cpp` subdirectories of `/codeql-dbs/example-repo-multi`.
|
||||
結果のデータベースは、`/codeql-dbs/example-repo-multi` の `python` および `cpp` サブディレクトリに格納されます。
|
||||
|
||||
```
|
||||
$ codeql database create /codeql-dbs/example-repo-multi \
|
||||
@@ -132,10 +136,10 @@ Successfully created databases at /codeql-dbs/example-repo-multi.
|
||||
$
|
||||
```
|
||||
|
||||
## Analyzing a {% data variables.product.prodname_codeql %} database
|
||||
## {% data variables.product.prodname_codeql %}データベースの分析
|
||||
|
||||
1. Create a {% data variables.product.prodname_codeql %} database (see above).
|
||||
2. Run `codeql database analyze` on the database and specify which {% ifversion codeql-packs %}packs and/or {% endif %}queries to use.
|
||||
1. {% data variables.product.prodname_codeql %}データベースを作成してください(上記参照)。
|
||||
2. データベースに対して `codeql database analyze` を実行し、使用する{% ifversion codeql-packs %}パックまたは{% endif %}クエリを指定します。
|
||||
```shell
|
||||
codeql database analyze <database> --format=<format> \
|
||||
--output=<output> {% ifversion codeql-packs %}--download <packs,queries>{% else %}<queries>{% endif %}
|
||||
@@ -143,7 +147,7 @@ $
|
||||
|
||||
{% note %}
|
||||
|
||||
**Note:** If you analyze more than one {% data variables.product.prodname_codeql %} database for a single commit, you must specify a SARIF category for each set of results generated by this command. When you upload the results to {% data variables.product.product_name %}, {% data variables.product.prodname_code_scanning %} uses this category to store the results for each language separately. If you forget to do this, each upload overwrites the previous results.
|
||||
**注:** 1 つのコミットに対して複数の {% data variables.product.prodname_codeql %} データベースを分析する場合、このコマンドによって生成されるそれぞれの結果セットに対して SARIF カテゴリを指定する必要があります。 結果を{% data variables.product.product_name %}にアップロードする際には、{% data variables.product.prodname_code_scanning %}はこのカテゴリを使ってそれぞれの言語に対する結果を別々に保存します。 この操作を忘れた場合は、各アップロードで前の結果が上書きされます。
|
||||
|
||||
```shell
|
||||
codeql database analyze <database> --format=<format> \
|
||||
@@ -152,24 +156,24 @@ codeql database analyze <database> --format=<format> \
|
||||
```
|
||||
{% endnote %}
|
||||
|
||||
| Option | Required | Usage |
|
||||
| オプション | 必須 | 使用法 |
|
||||
|--------|:--------:|-----|
|
||||
| `<database>` | {% octicon "check-circle-fill" aria-label="Required" %} | Specify the path for the directory that contains the {% data variables.product.prodname_codeql %} database to analyze. |
|
||||
| `<packs,queries>` | | Specify {% data variables.product.prodname_codeql %} packs or queries to run. To run the standard queries used for {% data variables.product.prodname_code_scanning %}, omit this parameter. To see the other query suites included in the {% data variables.product.prodname_codeql_cli %} bundle, look in `/<extraction-root>/qlpacks/codeql/<language>-queries/codeql-suites`. For information about creating your own query suite, see [Creating CodeQL query suites](https://codeql.github.com/docs/codeql-cli/creating-codeql-query-suites/) in the documentation for the {% data variables.product.prodname_codeql_cli %}.
|
||||
| <nobr>`--format`</nobr> | {% octicon "check-circle-fill" aria-label="Required" %} | Specify the format for the results file generated by the command. For upload to {% data variables.product.company_short %} this should be: {% ifversion fpt or ghae or ghec %}`sarif-latest`{% else %}`sarifv2.1.0`{% endif %}. For more information, see "[SARIF support for {% data variables.product.prodname_code_scanning %}](/code-security/secure-coding/sarif-support-for-code-scanning)."
|
||||
| <nobr>`--output`</nobr> | {% octicon "check-circle-fill" aria-label="Required" %} | Specify where to save the SARIF results file.
|
||||
| <nobr>`--sarif-category`<nobr> | {% octicon "question" aria-label="Required with multiple results sets" %} | Optional for single database analysis. Required to define the language when you analyze multiple databases for a single commit in a repository. Specify a category to include in the SARIF results file for this analysis. A category is used to distinguish multiple analyses for the same tool and commit, but performed on different languages or different parts of the code.|{% ifversion fpt or ghes > 3.3 or ghae or ghec %}
|
||||
| <nobr>`--sarif-add-query-help`</nobr> | | Optional. Use if you want to include any available markdown-rendered query help for custom queries used in your analysis. Any query help for custom queries included in the SARIF output will be displayed in the code scanning UI if the relevant query generates an alert. For more information, see [Analyzing databases with the {% data variables.product.prodname_codeql_cli %}](https://codeql.github.com/docs/codeql-cli/analyzing-databases-with-the-codeql-cli/#including-query-help-for-custom-codeql-queries-in-sarif-files) in the documentation for the {% data variables.product.prodname_codeql_cli %}.{% endif %}{% ifversion codeql-packs %}
|
||||
| `<packs>` | | Optional. Use if you want to include CodeQL query packs in your analysis. For more information, see "[Downloading and using {% data variables.product.prodname_codeql %} packs](#downloading-and-using-codeql-query-packs)."
|
||||
| <nobr>`--download`</nobr> | | Optional. Use if some of your CodeQL query packs are not yet on disk and need to be downloaded before running queries.{% endif %}
|
||||
| <nobr>`--threads`</nobr> | | Optional. Use if you want to use more than one thread to run queries. The default value is `1`. You can specify more threads to speed up query execution. To set the number of threads to the number of logical processors, specify `0`.
|
||||
| <nobr>`--verbose`</nobr> | | Optional. Use to get more detailed information about the analysis process and diagnostic data from the database creation process.
|
||||
| `<database>` | {% octicon "check-circle-fill" aria-label="Required" %} | 分析する{% data variables.product.prodname_codeql %}データベースを含むディレクトリのパスを指定します。 |
|
||||
| `<packs,queries>` | | 実行する {% data variables.product.prodname_codeql %} パックまたはクエリを指定します。 {% data variables.product.prodname_code_scanning %} に使用される標準クエリを実行するには、このパラメーターを省略します。 {% data variables.product.prodname_codeql_cli %} バンドルに含まれている他のクエリ スイートを確認する場合は、`/<extraction-root>/qlpacks/codeql/<language>-queries/codeql-suites` を参照してください。 独自のクエリ スイートの作成については、{% data variables.product.prodname_codeql_cli %} のドキュメントの「[CodeQL クエリ スイートの作成](https://codeql.github.com/docs/codeql-cli/creating-codeql-query-suites/)」を参照してください。
|
||||
| <nobr>`--format`</nobr> | {% octicon "check-circle-fill" aria-label="Required" %} | コマンドによって生成される結果ファイルの形式を指定します。 {% data variables.product.company_short %} へのアップロードの場合、これは {% ifversion fpt or ghae or ghec %}`sarif-latest`{% else %}`sarifv2.1.0`{% endif %} である必要があります。 詳細については、「[{% data variables.product.prodname_code_scanning %} の SARIF サポート](/code-security/secure-coding/sarif-support-for-code-scanning)」を参照してください。
|
||||
| <nobr>`--output`</nobr> | {% octicon "check-circle-fill" aria-label="Required" %} | SARIF 結果ファイルを保存する場所を指定します。
|
||||
| <nobr>`--sarif-category`<nobr> | {% octicon "question" aria-label="Required with multiple results sets" %} | 単一データベースの分析の場合は省略可能です。 リポジトリ内の単一コミットに対して複数のデータベースを分析する場合に言語を定義するために必要です。 この分析の SARIF 結果ファイルに含めるカテゴリを指定します。 カテゴリは、同じツールとコミットに対する複数の分析を区別するために使用されますが、異なる言語またはコードの異なる部分で実行されます。|{% ifversion fpt or ghes > 3.3 or ghae or ghec %}
|
||||
| <nobr>`--sarif-add-query-help`</nobr> | | 省略可能。 分析で使用されるカスタム クエリに対して使用可能なマークダウン レンダリング クエリ ヘルプを含める場合に使用します。 関連するクエリによってアラートが生成された場合は、SARIF 出力に含まれるカスタム クエリのクエリ ヘルプがすべてコード スキャン UI に表示されます。 詳細については、{% data variables.product.prodname_codeql_cli %} のドキュメントの「[{% data variables.product.prodname_codeql_cli %} でのデータベースの分析](https://codeql.github.com/docs/codeql-cli/analyzing-databases-with-the-codeql-cli/#including-query-help-for-custom-codeql-queries-in-sarif-files)」を参照してください。{% endif %}{% ifversion codeql-packs %}
|
||||
| `<packs>` | | 省略可能。 CodeQL クエリ パックを分析に含めたい場合に使います。 詳細については、「[{% data variables.product.prodname_codeql %} パックのダウンロードと使用](#downloading-and-using-codeql-query-packs)」を参照してください。
|
||||
| <nobr>`--download`</nobr> | | 省略可能。 CodeQL クエリ パックの一部がまだディスク上になく、クエリを実行する前にダウンロードする必要がある場合に使います。{% endif %}
|
||||
| <nobr>`--threads`</nobr> | | 任意。 複数のスレッドを使用してクエリを実行する場合に使用します。 既定値は `1` です。 クエリの実行を高速化するために、より多くのスレッドを指定できます。 スレッドの数を論理プロセッサの数に設定するには、`0` を指定します。
|
||||
| <nobr>`--verbose`</nobr> | | 省略可能。 データベース作成プロセスから分析プロセスと診断データに関する詳細情報を取得するために使用します。
|
||||
|
||||
For more information, see [Analyzing databases with the {% data variables.product.prodname_codeql_cli %}](https://codeql.github.com/docs/codeql-cli/analyzing-databases-with-the-codeql-cli/) in the documentation for the {% data variables.product.prodname_codeql_cli %}.
|
||||
詳細については、{% data variables.product.prodname_codeql_cli %} のドキュメントの「[{% data variables.product.prodname_codeql_cli %} でのデータベースの分析](https://codeql.github.com/docs/codeql-cli/analyzing-databases-with-the-codeql-cli/)」を参照してください。
|
||||
|
||||
### Basic example
|
||||
### 基本的な例
|
||||
|
||||
This example analyzes a {% data variables.product.prodname_codeql %} database stored at `/codeql-dbs/example-repo` and saves the results as a SARIF file: `/temp/example-repo-js.sarif`. It uses `--sarif-category` to include extra information in the SARIF file that identifies the results as JavaScript. This is essential when you have more than one {% data variables.product.prodname_codeql %} database to analyze for a single commit in a repository.
|
||||
この例では、`/codeql-dbs/example-repo` で格納されている {% data variables.product.prodname_codeql %} データベースを分析し、結果を SARIF ファイル (`/temp/example-repo-js.sarif`) として保存します。 `--sarif-category` を使用して、結果を JavaScript として識別する追加の情報を SARIF ファイルに含めます。 これは、リポジトリ中の単一のコミットに対して分析する{% data variables.product.prodname_codeql %}データベースが複数ある場合に不可欠です。
|
||||
|
||||
```
|
||||
$ codeql database analyze /codeql-dbs/example-repo \
|
||||
@@ -183,16 +187,16 @@ $ codeql database analyze /codeql-dbs/example-repo \
|
||||
> Interpreting results.
|
||||
```
|
||||
|
||||
## Uploading results to {% data variables.product.product_name %}
|
||||
## {% data variables.product.product_name %}への結果のアップロード
|
||||
|
||||
{% data reusables.code-scanning.upload-sarif-alert-limit %}
|
||||
|
||||
Before you can upload results to {% data variables.product.product_name %}, you must determine the best way to pass the {% data variables.product.prodname_github_app %} or personal access token you created earlier to the {% data variables.product.prodname_codeql_cli %} (see [Installing {% data variables.product.prodname_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#generating-a-token-for-authentication-with-github)). We recommend that you review your CI system's guidance on the secure use of a secret store. The {% data variables.product.prodname_codeql_cli %} supports:
|
||||
結果を {% data variables.product.product_name %} にアップロードする前に、{% data variables.product.prodname_github_app %}または個人用アクセス トークン (以前に作成したもの) を {% 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/installing-codeql-cli-in-your-ci-system#generating-a-token-for-authentication-with-github)」を参照)。 シークレット ストアの安全な使用に関する CI システムのガイダンスを確認することをお勧めします。 {% data variables.product.prodname_codeql_cli %}は以下をサポートします。
|
||||
|
||||
- Passing the token to the CLI via standard input using the `--github-auth-stdin` option (recommended).
|
||||
- Saving the secret in the environment variable `GITHUB_TOKEN` and running the CLI without including the `--github-auth-stdin` option.
|
||||
- `--github-auth-stdin` オプションを使用し、標準入力を介して CLI にトークンを渡す (推奨)。
|
||||
- 環境変数 `GITHUB_TOKEN` にシークレットを保存し、`--github-auth-stdin` オプションを含めずに CLI を実行する。
|
||||
|
||||
When you have decided on the most secure and reliable method for your CI server, run `codeql github upload-results` on each SARIF results file and include `--github-auth-stdin` unless the token is available in the environment variable `GITHUB_TOKEN`.
|
||||
CI サーバーの最も安全で信頼性の高い方法を決定した場合は、各 SARIF 結果ファイルで `codeql github upload-results` を実行し、トークンが環境変数 `GITHUB_TOKEN` で使用可能でない限り、`--github-auth-stdin` を含めます。
|
||||
|
||||
```shell
|
||||
echo "$UPLOAD_TOKEN" | codeql github upload-results --repository=<repository-name> \
|
||||
@@ -200,20 +204,20 @@ When you have decided on the most secure and reliable method for your CI server,
|
||||
{% ifversion ghes or ghae %}--github-url=<URL> {% endif %}--github-auth-stdin
|
||||
```
|
||||
|
||||
| Option | Required | Usage |
|
||||
| オプション | 必須 | 使用法 |
|
||||
|--------|:--------:|-----|
|
||||
| <nobr>`--repository`</nobr> | {% octicon "check-circle-fill" aria-label="Required" %} | Specify the *OWNER/NAME* of the repository to upload data to. The owner must be an organization within an enterprise that has a license for {% data variables.product.prodname_GH_advanced_security %} and {% data variables.product.prodname_GH_advanced_security %} must be enabled for the repository{% ifversion fpt or ghec %}, unless the repository is public{% endif %}. For more information, see "[Managing security and analysis settings for your repository](/github/administering-a-repository/managing-security-and-analysis-settings-for-your-repository)."
|
||||
| <nobr>`--ref`</nobr> | {% octicon "check-circle-fill" aria-label="Required" %} | Specify the name of the `ref` you checked out and analyzed so that the results can be matched to the correct code. For a branch use: `refs/heads/BRANCH-NAME`, for the head commit of a pull request use `refs/pull/NUMBER/head`, or for the {% data variables.product.prodname_dotcom %}-generated merge commit of a pull request use `refs/pull/NUMBER/merge`.
|
||||
| <nobr>`--commit`</nobr> | {% octicon "check-circle-fill" aria-label="Required" %} | Specify the full SHA of the commit you analyzed.
|
||||
| <nobr>`--sarif`</nobr> | {% octicon "check-circle-fill" aria-label="Required" %} | Specify the SARIF file to load.{% ifversion ghes or ghae %}
|
||||
| <nobr>`--github-url`</nobr> | {% octicon "check-circle-fill" aria-label="Required" %} | Specify the URL for {% data variables.product.product_name %}.{% endif %}
|
||||
| <nobr>`--github-auth-stdin`</nobr> | | Optional. Use to pass the CLI the {% data variables.product.prodname_github_app %} or personal access token created for authentication with {% data variables.product.company_short %}'s REST API via standard input. This is not needed if the command has access to a `GITHUB_TOKEN` environment variable set with this token.
|
||||
| <nobr>`--repository`</nobr> | {% octicon "check-circle-fill" aria-label="Required" %} | データのアップロード先となるリポジトリの *OWNER/NAME* を指定します。 {% ifversion fpt or ghec %}リポジトリがパブリックでなければ、{% endif %}オーナーは {% data variables.product.prodname_GH_advanced_security %} のライセンスを持つ Enterprise 内の Organization でなければならず、{% data variables.product.prodname_GH_advanced_security %} はリポジトリで有効化されていなければなりません。 詳細については、「[リポジトリのセキュリティと分析の設定を管理する](/github/administering-a-repository/managing-security-and-analysis-settings-for-your-repository)」を参照してください。
|
||||
| <nobr>`--ref`</nobr> | {% octicon "check-circle-fill" aria-label="Required" %} | チェックアウトして分析した `ref` の名前を指定して、結果を正しいコードと照合できるようにします。 ブランチで `refs/heads/BRANCH-NAME` を使用するか、pull request のヘッド コミットで `refs/pull/NUMBER/head` を使用するか、pull request の {% data variables.product.prodname_dotcom %} で生成されたマージ コミットで `refs/pull/NUMBER/merge` を使用します。
|
||||
| <nobr>`--commit`</nobr> | {% octicon "check-circle-fill" aria-label="Required" %} | 分析したコミットの完全な SHA を指定します。
|
||||
| <nobr>`--sarif`</nobr> | {% octicon "check-circle-fill" aria-label="Required" %} | 読み込む SARIF ファイルを指定します。{% ifversion ghes or ghae %}
|
||||
| <nobr>`--github-url`</nobr> | {% octicon "check-circle-fill" aria-label="Required" %} | {% data variables.product.product_name %}のURLを指定してください。{% endif %}
|
||||
| <nobr>`--github-auth-stdin`</nobr> | | 任意。 {% data variables.product.prodname_github_app %}もしくは{% data variables.product.company_short %}のREST APIの認証のために作成された個人アクセストークンを標準入力経由でCLIに渡すために使います。 このトークンを使用して設定された `GITHUB_TOKEN` 環境変数にコマンドがアクセスできる場合、これは必要ありません。
|
||||
|
||||
For more information, see [github upload-results](https://codeql.github.com/docs/codeql-cli/manual/github-upload-results/) in the documentation for the {% data variables.product.prodname_codeql_cli %}.
|
||||
詳細については、{% data variables.product.prodname_codeql_cli %} のドキュメントの「[github upload-results](https://codeql.github.com/docs/codeql-cli/manual/github-upload-results/)」を参照してください。
|
||||
|
||||
### Basic example
|
||||
### 基本的な例
|
||||
|
||||
This example uploads results from the SARIF file `temp/example-repo-js.sarif` to the repository `my-org/example-repo`. It tells the {% data variables.product.prodname_code_scanning %} API that the results are for the commit `deb275d2d5fe9a522a0b7bd8b6b6a1c939552718` on the `main` branch.
|
||||
この例では、SARIF ファイル `temp/example-repo-js.sarif` からリポジトリ `my-org/example-repo` に結果をアップロードします。 結果が `main` ブランチのコミット `deb275d2d5fe9a522a0b7bd8b6b6a1c939552718` に対するものであることを {% data variables.product.prodname_code_scanning %} API に伝えます。
|
||||
|
||||
```
|
||||
$ echo $UPLOAD_TOKEN | codeql github upload-results --repository=my-org/example-repo \
|
||||
@@ -222,30 +226,30 @@ $ echo $UPLOAD_TOKEN | codeql github upload-results --repository=my-org/example-
|
||||
{% endif %}--github-auth-stdin
|
||||
```
|
||||
|
||||
There is no output from this command unless the upload was unsuccessful. The command prompt returns when the upload is complete and data processing has begun. On smaller codebases, you should be able to explore the {% data variables.product.prodname_code_scanning %} alerts in {% data variables.product.product_name %} shortly afterward. You can see alerts directly in the pull request or on the **Security** tab for branches, depending on the code you checked out. 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)" and "[Managing {% data variables.product.prodname_code_scanning %} alerts for your repository](/code-security/secure-coding/managing-code-scanning-alerts-for-your-repository)."
|
||||
アップロードが失敗しなければ、このコマンドからの出力はありません。 コマンドプロンプトは、アップロードが完了してデータ処理が開始された時点で戻ってきます。 小さなコードベースでは、すぐ後に{% data variables.product.product_name %}中の{% data variables.product.prodname_code_scanning %}アラートを調べることができるでしょう。 チェックアウトしたコードに応じて、アラートを直接 pull request に、またはブランチの **[セキュリティ]** タブで表示できます。詳細については、「[pull request での{% 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/managing-code-scanning-alerts-for-your-repository)」を参照してください。
|
||||
|
||||
{% ifversion codeql-packs %}
|
||||
## Downloading and using {% data variables.product.prodname_codeql %} query packs
|
||||
## {% data variables.product.prodname_codeql %} クエリ パックのダウンロードと使用
|
||||
|
||||
{% data reusables.code-scanning.beta-codeql-packs-cli %}
|
||||
|
||||
The {% data variables.product.prodname_codeql_cli %} bundle includes queries that are maintained by {% data variables.product.company_short %} experts, security researchers, and community contributors. If you want to run queries developed by other organizations, {% data variables.product.prodname_codeql %} query packs provide an efficient and reliable way to download and run queries. For more information, see "[About code scanning with CodeQL](/code-security/secure-coding/automatically-scanning-your-code-for-vulnerabilities-and-errors/about-code-scanning-with-codeql#about-codeql-queries)."
|
||||
{% data variables.product.prodname_codeql_cli %} バンドルには、{% data variables.product.company_short %} の専門家、セキュリティ研究者、コミュニティの共同作成者によって管理されるクエリが含まれます。 他の Organization によって開発されたクエリを実行する場合、{% data variables.product.prodname_codeql %} クエリ パックを使用すると、クエリを効率的かつ信頼性の高い方法でダウンロードして実行できます。 詳細については、「[CodeQL によるコード スキャンについて](/code-security/secure-coding/automatically-scanning-your-code-for-vulnerabilities-and-errors/about-code-scanning-with-codeql#about-codeql-queries)」を参照してください。
|
||||
|
||||
Before you can use a {% data variables.product.prodname_codeql %} pack to analyze a database, you must download any packages you require from the {% data variables.product.company_short %} {% data variables.product.prodname_container_registry %}. This can be done either by using the `--download` flag as part of the `codeql database analyze` command. If a package is not publicly available, you will need to use a {% data variables.product.prodname_github_app %} or personal access token to authenticate. For more information and an example, see "[Uploading results to {% data variables.product.product_name %}](#uploading-results-to-github)" above.
|
||||
{% data variables.product.prodname_codeql %} パックを使ってデータベースを分析する前に、{% data variables.product.company_short %} {% data variables.product.prodname_container_registry %} から必要なパッケージをすべてダウンロードする必要があります。 これは、`codeql database analyze` コマンドの一部として `--download` フラグを使うことによって行うことができます。 パッケージが一般公開されていない場合は、認証に {% data variables.product.prodname_github_app %} または個人用アクセス トークンを使用する必要があります。 詳細と例については、上記の「[{% data variables.product.product_name %} への結果のアップロード](#uploading-results-to-github)」を参照してください。
|
||||
|
||||
| Option | Required | Usage |
|
||||
| オプション | 必須 | 使用法 |
|
||||
|--------|:--------:|-----|
|
||||
| <nobr>`<scope/name@version:path>`</nobr> | {% octicon "check-circle-fill" aria-label="Required" %} | Specify the scope and name of one or more CodeQL query packs to download using a comma-separated list. Optionally, include the version to download and unzip. By default the latest version of this pack is downloaded. Optionally, include a path to a query, directory, or query suite to run. If no path is included, then run the default queries of this pack. |
|
||||
| <nobr>`--github-auth-stdin`</nobr> | | Optional. Pass the {% data variables.product.prodname_github_app %} or personal access token created for authentication with {% data variables.product.company_short %}'s REST API to the CLI via standard input. This is not needed if the command has access to a `GITHUB_TOKEN` environment variable set with this token.
|
||||
| <nobr>`<scope/name@version:path>`</nobr> | {% octicon "check-circle-fill" aria-label="Required" %} | コンマ区切りリストを使用して、ダウンロードする 1 つまたは複数の CodeQL クエリ パックのスコープと名前を指定します。 必要に応じて、ダウンロードして解凍するバージョンを含めます。 既定では、このパックの最新バージョンがダウンロードされます。 必要に応じて、実行するクエリ、ディレクトリ、またはクエリ スイートへのパスを含めます。 パスが含まれていない場合、このパックの既定のクエリを実行します。 |
|
||||
| <nobr>`--github-auth-stdin`</nobr> | | 任意。 {% data variables.product.prodname_github_app %} または個人用アクセス トークン ({% data variables.product.company_short %} の REST API での認証のために作成されたもの) を標準入力経由で CLI に渡します。 このトークンを使用して設定された `GITHUB_TOKEN` 環境変数にコマンドがアクセスできる場合、これは必要ありません。
|
||||
|
||||
### Basic example
|
||||
### 基本的な例
|
||||
|
||||
This example runs the `codeql database analyze` command with the `--download` option to:
|
||||
この例では、`codeql database analyze` コマンドに `--download` オプションを付けて実行しています。
|
||||
|
||||
1. Download the latest version of the `octo-org/security-queries` pack.
|
||||
2. Download a version of the `octo-org/optional-security-queries` pack that is *compatible* with version 1.0.1 (in this case, it is version 1.0.2). For more information on semver compatibility, see [npm's semantic version range documentation](https://github.com/npm/node-semver#ranges).
|
||||
3. Run all the default queries in `octo-org/security-queries`.
|
||||
4. Run only the query `queries/csrf.ql` from `octo-org/optional-security-queries`
|
||||
1. 最新バージョンの `octo-org/security-queries` パックをダウンロードします。
|
||||
2. バージョン 1.0.1 と`octo-org/optional-security-queries`互換性のある *バージョンの* パックをダウンロードします (この場合はバージョン 1.0.2 です)。 semver の互換性については、[npm のセマンティック バージョンの範囲に関するドキュメント](https://github.com/npm/node-semver#ranges)を参照してください。
|
||||
3. `octo-org/security-queries` の既定のクエリをすべて実行します。
|
||||
4. `octo-org/optional-security-queries` のクエリ `queries/csrf.ql` だけを実行します
|
||||
|
||||
```
|
||||
$ echo $OCTO-ORG_ACCESS_TOKEN | codeql database analyze --download /codeql-dbs/example-repo \
|
||||
@@ -268,18 +272,18 @@ $ echo $OCTO-ORG_ACCESS_TOKEN | codeql database analyze --download /codeql-dbs/e
|
||||
> Interpreting results.
|
||||
```
|
||||
|
||||
### Direct download of {% data variables.product.prodname_codeql %} packs
|
||||
### {% data variables.product.prodname_codeql %} パックの直接ダウンロード
|
||||
|
||||
If you want to download a {% data variables.product.prodname_codeql %} pack without running it immediately, then you can use the `codeql pack download` command. This is useful if you want to avoid accessing the internet when running {% data variables.product.prodname_codeql %} queries. When you run the {% data variables.product.prodname_codeql %} analysis, you can specify packs, versions, and paths in the same way as in the previous example:
|
||||
{% data variables.product.prodname_codeql %} パックをダウンロードしてすぐに実行しない場合、`codeql pack download` コマンドを使用できます。 これは、{% data variables.product.prodname_codeql %} クエリを実行するとき、インターネットへのアクセスをしないようにする場合、便利です。 {% data variables.product.prodname_codeql %} 分析を実行するとき、前の例と同じ方法でパック、バージョン、パスを指定できます。
|
||||
|
||||
```shell
|
||||
echo $OCTO-ORG_ACCESS_TOKEN | codeql pack download <scope/name@version:path> <scope/name@version:path> ...
|
||||
```
|
||||
{% endif %}
|
||||
|
||||
## Example CI configuration for {% data variables.product.prodname_codeql %} analysis
|
||||
## {% data variables.product.prodname_codeql %}分析のためのCIの設定例
|
||||
|
||||
This is an example of the series of commands that you might use to analyze a codebase with two supported languages and then upload the results to {% data variables.product.product_name %}.
|
||||
これは、2つのサポートされている言語を持つコードベースを分析し、結果を{% data variables.product.product_name %}にアップロードするために使うことができる一連のコマンドの例です。
|
||||
|
||||
```shell
|
||||
# Create CodeQL databases for Java and Python in the 'codeql-dbs' directory
|
||||
@@ -313,21 +317,21 @@ echo $UPLOAD_TOKEN | codeql github upload-results --repository=my-org/example-re
|
||||
--sarif=python-results.sarif --github-auth-stdin
|
||||
```
|
||||
|
||||
## Troubleshooting the {% data variables.product.prodname_codeql_cli %} in your CI system
|
||||
## CIシステムでの{% data variables.product.prodname_codeql_cli %}のトラブルシューティング
|
||||
|
||||
### Viewing log and diagnostic information
|
||||
### ログと診断情報を見る
|
||||
|
||||
When you analyze a {% data variables.product.prodname_codeql %} database using a {% data variables.product.prodname_code_scanning %} query suite, in addition to generating detailed information about alerts, the CLI reports diagnostic data from the database generation step and summary metrics. For repositories with few alerts, you may find this information useful for determining if there are genuinely few problems in the code, or if there were errors generating the {% data variables.product.prodname_codeql %} database. For more detailed output from `codeql database analyze`, use the `--verbose` option.
|
||||
{% data variables.product.prodname_code_scanning %}クエリスイートを使って{% data variables.product.prodname_codeql %}データベースを分析する際には、アラートに関する詳細情報を生成するのに加えて、CLIはデータベース生成ステップからの診断情報とサマリメトリクスを報告します。 アラートが少ないリポジトリでは、実際にコード中の問題が少ないのか、あるいは{% data variables.product.prodname_codeql %}データベースの生成時にエラーがあったのかを判断するのにこの情報が役立つかもしれません。 `codeql database analyze` からさらに詳しい出力を得るには、`--verbose` オプションを使用します。
|
||||
|
||||
For more information about the type of diagnostic information available, see "[Viewing {% data variables.product.prodname_code_scanning %} logs](/code-security/secure-coding/automatically-scanning-your-code-for-vulnerabilities-and-errors/viewing-code-scanning-logs#about-analysis-and-diagnostic-information)".
|
||||
使用可能な診断情報の種類について詳しくは、「[{% data variables.product.prodname_code_scanning %} ログの表示](/code-security/secure-coding/automatically-scanning-your-code-for-vulnerabilities-and-errors/viewing-code-scanning-logs#about-analysis-and-diagnostic-information)」を参照してください。
|
||||
|
||||
### {% data variables.product.prodname_code_scanning_capc %} only shows analysis results from one of the analyzed languages
|
||||
### {% data variables.product.prodname_code_scanning_capc %}は、分析された言語の1つからの分析結果だけを表示します。
|
||||
|
||||
By default, {% data variables.product.prodname_code_scanning %} expects one SARIF results file per analysis for a repository. Consequently, when you upload a second SARIF results file for a commit, it is treated as a replacement for the original set of data.
|
||||
デフォルトでは、{% data variables.product.prodname_code_scanning %}はリポジトリの分析ごとに1つのSARIF結果ファイルを期待します。 したがって、コミットから2つめのSARIF結果ファイルをアップロードすると、それはデータのオリジナルのセットの置き換えとして扱われます。
|
||||
|
||||
If you want to upload more than one set of results to the {% data variables.product.prodname_code_scanning %} API for a commit in a repository, you must identify each set of results as a unique set. For repositories where you create more than one {% data variables.product.prodname_codeql %} database to analyze for each commit, use the `--sarif-category` option to specify a language or other unique category for each SARIF file that you generate for that repository.
|
||||
リポジトリ中の1つのコミットについての結果を{% data variables.product.prodname_code_scanning %} APIに複数アップロードしたい場合は、それぞれの結果をユニークなセットとして特定しなければなりません。 コミットごとに分析する {% data variables.product.prodname_codeql %} データセットを複数作成するリポジトリでは、`--sarif-category` オプションを使用して、そのリポジトリで生成するそれぞれの SARIF ファイルに言語または他の一意のカテゴリを指定します。
|
||||
|
||||
## Further reading
|
||||
## 参考資料
|
||||
|
||||
- [Creating CodeQL databases](https://codeql.github.com/docs/codeql-cli/creating-codeql-databases/)
|
||||
- [Analyzing databases with the CodeQL CLI](https://codeql.github.com/docs/codeql-cli/analyzing-databases-with-the-codeql-cli/)
|
||||
- [CodeQL データベースの作成](https://codeql.github.com/docs/codeql-cli/creating-codeql-databases/)
|
||||
- [CodeQL CLI でのデータベースの分析](https://codeql.github.com/docs/codeql-cli/analyzing-databases-with-the-codeql-cli/)
|
||||
|
||||
@@ -24,11 +24,11 @@ redirect_from:
|
||||
- /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: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5
|
||||
ms.sourcegitcommit: 80842b4e4c500daa051eff0ccd7cde91c2d4bb36
|
||||
ms.translationtype: HT
|
||||
ms.contentlocale: ja-JP
|
||||
ms.lasthandoff: 09/05/2022
|
||||
ms.locfileid: '147052081'
|
||||
ms.lasthandoff: 09/11/2022
|
||||
ms.locfileid: '147884543'
|
||||
---
|
||||
{% data reusables.code-scanning.enterprise-enable-code-scanning %}
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
title: Configuring Dependabot security updates (Dependabot セキュリティ アップデートの構成)
|
||||
intro: '{% data variables.product.prodname_dependabot_security_updates %} または手動のプルリクエストを使用して、脆弱性のある依存関係を簡単に更新できます。'
|
||||
title: Configuring Dependabot security updates
|
||||
intro: 'You can use {% data variables.product.prodname_dependabot_security_updates %} or manual pull requests to easily update vulnerable dependencies.'
|
||||
shortTitle: Configure security updates
|
||||
redirect_from:
|
||||
- /articles/configuring-automated-security-fixes
|
||||
@@ -22,64 +22,47 @@ topics:
|
||||
- Dependencies
|
||||
- Pull requests
|
||||
- Repositories
|
||||
ms.openlocfilehash: d45ba3ee3e45bcab91d9ddafdb8fb23da4963c8e
|
||||
ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5
|
||||
ms.translationtype: HT
|
||||
ms.contentlocale: ja-JP
|
||||
ms.lasthandoff: 09/05/2022
|
||||
ms.locfileid: '146027956'
|
||||
---
|
||||
<!--Marketing-LINK: From home page "Learn more about Dependabot".-->
|
||||
|
||||
{% 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_security_updates %} の設定について
|
||||
## About configuring {% data variables.product.prodname_dependabot_security_updates %}
|
||||
|
||||
{% data variables.product.prodname_dependabot_alerts %} と依存関係グラフを使用する任意のリポジトリで {% data variables.product.prodname_dependabot_security_updates %} を有効にすることができます。 詳細については、「[{% data variables.product.prodname_dependabot_security_updates %}について](/github/managing-security-vulnerabilities/about-dependabot-security-updates)」を参照してください。
|
||||
You can enable {% data variables.product.prodname_dependabot_security_updates %} at the repository level or for all repositories owned by your personal account or organization. You can enable {% data variables.product.prodname_dependabot_security_updates %} for any repository that uses {% data variables.product.prodname_dependabot_alerts %} and the dependency graph. For more information, see "[About {% data variables.product.prodname_dependabot_security_updates %}](/github/managing-security-vulnerabilities/about-dependabot-security-updates)."
|
||||
|
||||
個々のリポジトリ、または個人アカウントまたは組織が所有するすべてのリポジトリに対して {% data variables.product.prodname_dependabot_security_updates %} を無効にすることができます。 詳細については、以下の「[リポジトリの {% data variables.product.prodname_dependabot_security_updates %} を管理する](#managing-dependabot-security-updates-for-your-repositories)」を参照してください。
|
||||
You can disable {% data variables.product.prodname_dependabot_security_updates %} for an individual repository or for all repositories owned by your personal account or organization.
|
||||
|
||||
{% ifversion fpt or ghec %}{% data reusables.dependabot.dependabot-tos %}{% endif %}
|
||||
|
||||
## サポートされているリポジトリ
|
||||
## Supported repositories
|
||||
|
||||
{% data variables.product.prodname_dotcom %} は、これらの前提条件を満たすすべてのリポジトリに対して {% data variables.product.prodname_dependabot_security_updates %} を自動的に有効にします。
|
||||
{% data variables.product.prodname_dotcom %} automatically enables {% data variables.product.prodname_dependabot_security_updates %} for newly created repositories if your personal account or organization has enabled **Automatically enable for new repositories** for {% data variables.product.prodname_dependabot_security_updates %}. For more information, see "[Managing {% data variables.product.prodname_dependabot_security_updates %} for your repositories](#managing-dependabot-security-updates-for-your-repositories)."
|
||||
|
||||
{% note %}
|
||||
If you create a fork of a repository that has security updates enabled, {% data variables.product.prodname_dotcom %} will automatically disable {% data variables.product.prodname_dependabot_security_updates %} for the fork. You can then decide whether to enable {% data variables.product.prodname_dependabot_security_updates %} on the specific fork.
|
||||
|
||||
**注**: リポジトリが以下の前提条件のいくつかを満たしていない場合でも、手動で {% data variables.product.prodname_dependabot_security_updates %} を有効にすることができます。 たとえば、「[リポジトリの {% data variables.product.prodname_dependabot_security_updates %} を管理する](#managing-dependabot-security-updates-for-your-repositories)」の手順に従って、フォークまたは直接サポートされていないパッケージ マネージャーで {% data variables.product.prodname_dependabot_security_updates %} を有効にできます。
|
||||
If security updates are not enabled for your repository and you don't know why, first try enabling them using the instructions given in the procedural sections below. If security updates are still not working, you can contact {% data variables.contact.contact_support %}.
|
||||
|
||||
{% endnote %}
|
||||
## Managing {% data variables.product.prodname_dependabot_security_updates %} for your repositories
|
||||
|
||||
| 自動有効化の前提条件 | 詳細情報 |
|
||||
| ----------------- | ----------------------- |
|
||||
| リポジトリがフォークではない | 「[フォークについて](/github/collaborating-with-issues-and-pull-requests/about-forks)」 |
|
||||
| リポジトリがアーカイブされていない | 「[リポジトリのアーカイブ](/github/creating-cloning-and-archiving-repositories/archiving-repositories)」 |{% ifversion fpt or ghec %}
|
||||
| リポジトリがパブリックである、またはリポジトリがプライベートであり、リポジトリの設定で {% data variables.product.prodname_dotcom %}、依存関係グラフ、および脆弱性アラートによる読み取り専用分析が有効化されている | 「[プライベート リポジトリ用のデータ利用設定を管理する](/get-started/privacy-on-github/managing-data-use-settings-for-your-private-repository)」 |{% endif %}
|
||||
| リポジトリに {% data variables.product.prodname_dotcom %} がサポートするパッケージエコシステムの依存関係マニフェストファイルが含まれている | 「[サポートされているパッケージ エコシステム](/github/visualizing-repository-data-with-graphs/about-the-dependency-graph#supported-package-ecosystems)」 |
|
||||
| {% data variables.product.prodname_dependabot_security_updates %} がリポジトリに対して無効になっていない | 「[リポジトリの {% data variables.product.prodname_dependabot_security_updates %} を管理する](#managing-dependabot-security-updates-for-your-repositories)」 |
|
||||
You can enable or disable {% data variables.product.prodname_dependabot_security_updates %} for all qualifying repositories owned by your personal account or organization. For more information, see "[Managing security and analysis settings for your personal account](/account-and-profile/setting-up-and-managing-your-personal-account-on-github/managing-personal-account-settings/managing-security-and-analysis-settings-for-your-personal-account)" or "[Managing security and analysis settings for your organization](/organizations/keeping-your-organization-secure/managing-security-and-analysis-settings-for-your-organization)."
|
||||
|
||||
リポジトリでセキュリティアップデートが有効になっておらず、理由が不明の場合は、まず以下の手順のセクションに記載されている指示に従って有効にしてみてください。 セキュリティ更新プログラムがまだ機能していない場合は、{% data variables.contact.contact_support %} に問い合わせてください。
|
||||
You can also enable or disable {% data variables.product.prodname_dependabot_security_updates %} for an individual repository.
|
||||
|
||||
## リポジトリの {% data variables.product.prodname_dependabot_security_updates %} を管理する
|
||||
### Enabling or disabling {% data variables.product.prodname_dependabot_security_updates %} for an individual repository
|
||||
|
||||
個別のリポジトリに対して {% data variables.product.prodname_dependabot_security_updates %} を有効または無効にできます(下記参照)。
|
||||
{% data reusables.repositories.navigate-to-repo %}
|
||||
{% data reusables.repositories.sidebar-settings %}
|
||||
{% data reusables.repositories.navigate-to-code-security-and-analysis %}
|
||||
1. Under "Code security and analysis", to the right of "{% data variables.product.prodname_dependabot %} security updates", click **Enable** to enable the feature or **Disable** to disable it. {% ifversion fpt or ghec %}For public repositories, the button is disabled if the feature is always enabled.{% endif %}
|
||||
{% ifversion fpt or ghec %}{% elsif ghes > 3.6 or ghae-issue-7044 %}<!--Insert screenshot for GHES 3.7 when available--> {% else %}{% endif %}
|
||||
|
||||
## Overriding the default behavior with a configuration file
|
||||
|
||||
個人アカウントまたは組織が所有するすべてのリポジトリの {% data variables.product.prodname_dependabot_security_updates %} を有効または無効にすることもできます。 詳細については、「[個人アカウントのセキュリティと分析の設定を管理する](/account-and-profile/setting-up-and-managing-your-personal-account-on-github/managing-personal-account-settings/managing-security-and-analysis-settings-for-your-personal-account)」または「[組織のセキュリティと分析の設定を管理する](/organizations/keeping-your-organization-secure/managing-security-and-analysis-settings-for-your-organization)」を参照してください。
|
||||
You can override the default behavior of {% data variables.product.prodname_dependabot_security_updates %} by adding a dependabot.yml file to your repository. For more information, see "[Configuration options for the dependabot.yml file](/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file)."
|
||||
|
||||
{% data variables.product.prodname_dependabot_security_updates %} には特定のリポジトリ設定が必要です。 詳細については、「[サポートされているリポジトリ](#supported-repositories)」を参照してください。
|
||||
|
||||
### 個別のリポジトリに対して {% data variables.product.prodname_dependabot_security_updates %} を有効または無効にする
|
||||
|
||||
{% 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_dependabot %} セキュリティ更新プログラム] の右側にある **[有効]** または **[無効]** をクリックして、機能を有効または無効にします。 {% ifversion fpt or ghec %}パブリック リポジトリの場合、この機能が常に有効になっている場合、ボタンは無効になります。{% endif %} {% ifversion fpt or ghec %}![[コードのセキュリティと分析] セクションと {% data variables.product.prodname_dependabot_security_updates %} を有効にするボタンのスクリーンショット](/assets/images/help/repository/security-and-analysis-disable-or-enable-fpt-private.png){% elsif ghes > 3.6 or ghae-issue-7044 %}<!--Insert screenshot for GHES 3.7 when available--> {% else %}![[コードのセキュリティと分析] セクションと {% data variables.product.prodname_dependabot_security_updates %} を有効にするボタンのスクリーンショット](/assets/images/enterprise/3.3/repository/security-and-analysis-disable-or-enable-ghes.png){% endif %}
|
||||
|
||||
## 構成ファイルを使用した既定の動作のオーバーライド
|
||||
|
||||
リポジトリに dependabot.yml ファイルを追加することで、{% data variables.product.prodname_dependabot_security_updates %} の既定の動作をオーバーライドできます。 詳細については、「[dependabot.yml ファイルの構成オプション](/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file)」を参照してください。
|
||||
|
||||
セキュリティ更新プログラムのみを必要とし、バージョン更新プログラムを除外する場合は、特定の `package-ecosystem` のバージョン更新プログラムを防ぐために `open-pull-request-limit` を `0` に設定できます。 詳しくは、「[`open-pull-request-limit`](/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file#open-pull-requests-limit)」をご覧ください。
|
||||
If you only require security updates and want to exclude version updates, you can set `open-pull-request-limit` to `0` in order to prevent version updates for a given `package-ecosystem`. For more information, see "[`open-pull-request-limit`](/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file#open-pull-requests-limit)."
|
||||
|
||||
```
|
||||
# Example configuration file that:
|
||||
@@ -99,11 +82,11 @@ updates:
|
||||
open-pull-requests-limit: 0
|
||||
```
|
||||
|
||||
セキュリティ更新プログラムで使用可能な構成オプションの詳しい情報については、「[dependabot.yml ファイルの構成オプション](/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file#configuration-options-for-the-dependabotyml-file)」をご覧ください。
|
||||
For more information about the configuration options available for security updates, see the table in "[Configuration options for the dependabot.yml file](/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file#configuration-options-for-the-dependabotyml-file)."
|
||||
|
||||
## 参考資料
|
||||
## Further reading
|
||||
|
||||
- 「[About {% data variables.product.prodname_dependabot_alerts %}](/code-security/supply-chain-security/about-alerts-for-vulnerable-dependencies)」
|
||||
- 「[{% data variables.product.prodname_dependabot_alerts %} を構成する](/code-security/dependabot/dependabot-alerts/configuring-dependabot-alerts)」{% ifversion fpt or ghec %}
|
||||
- 「[プライベート リポジトリのデータ利用設定を管理する](/get-started/privacy-on-github/managing-data-use-settings-for-your-private-repository)」{% endif %}
|
||||
- 「[サポートされているパッケージ エコシステム](/github/visualizing-repository-data-with-graphs/about-the-dependency-graph#supported-package-ecosystems)」
|
||||
- "[About {% data variables.product.prodname_dependabot_alerts %}](/code-security/supply-chain-security/about-alerts-for-vulnerable-dependencies)"
|
||||
- "[Configuring {% data variables.product.prodname_dependabot_alerts %}](/code-security/dependabot/dependabot-alerts/configuring-dependabot-alerts)"{% ifversion fpt or ghec %}
|
||||
- "[Managing data use settings for your private repository](/get-started/privacy-on-github/managing-data-use-settings-for-your-private-repository)"{% endif %}
|
||||
- "[Supported package ecosystems](/github/visualizing-repository-data-with-graphs/about-the-dependency-graph#supported-package-ecosystems)"
|
||||
|
||||
@@ -20,10 +20,10 @@ children:
|
||||
- /dependabot-version-updates
|
||||
- /working-with-dependabot
|
||||
ms.openlocfilehash: 82b385ab7177adfe568344c0dc04357ffafeb0b3
|
||||
ms.sourcegitcommit: fcf3546b7cc208155fb8acdf68b81be28afc3d2d
|
||||
ms.sourcegitcommit: 80842b4e4c500daa051eff0ccd7cde91c2d4bb36
|
||||
ms.translationtype: HT
|
||||
ms.contentlocale: ja-JP
|
||||
ms.lasthandoff: 09/10/2022
|
||||
ms.lasthandoff: 09/12/2022
|
||||
ms.locfileid: '145124835'
|
||||
---
|
||||
|
||||
|
||||
@@ -23,11 +23,11 @@ topics:
|
||||
- CVEs
|
||||
- Repositories
|
||||
ms.openlocfilehash: 50e63a273d1bd787c2c324d3ceed9a8d31b64c9e
|
||||
ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5
|
||||
ms.sourcegitcommit: 770ed406ec075528ec9c9695aa4bfdc8c8b25fd3
|
||||
ms.translationtype: HT
|
||||
ms.contentlocale: ja-JP
|
||||
ms.lasthandoff: 09/05/2022
|
||||
ms.locfileid: '147526719'
|
||||
ms.lasthandoff: 09/11/2022
|
||||
ms.locfileid: '147883418'
|
||||
---
|
||||
{% data reusables.dependabot.beta-security-and-version-updates %} {% data reusables.dependabot.result-discrepancy %}
|
||||
|
||||
|
||||
@@ -13,11 +13,11 @@ topics:
|
||||
- Vulnerabilities
|
||||
- Advanced Security
|
||||
ms.openlocfilehash: fc2e4452e83245535c3d5f7ead70b1b23a5d874a
|
||||
ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5
|
||||
ms.sourcegitcommit: fb047f9450b41b24afc43d9512a5db2a2b750a2a
|
||||
ms.translationtype: HT
|
||||
ms.contentlocale: ja-JP
|
||||
ms.lasthandoff: 09/05/2022
|
||||
ms.locfileid: '147525618'
|
||||
ms.lasthandoff: 09/11/2022
|
||||
ms.locfileid: '147881486'
|
||||
---
|
||||
## {% data variables.product.prodname_dotcom %}のセキュリティ機能について
|
||||
|
||||
|
||||
@@ -21,11 +21,11 @@ topics:
|
||||
- Teams
|
||||
shortTitle: About security overview
|
||||
ms.openlocfilehash: ac069277564d7249d36b54f218c78f33eefc3c47
|
||||
ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5
|
||||
ms.sourcegitcommit: fb047f9450b41b24afc43d9512a5db2a2b750a2a
|
||||
ms.translationtype: HT
|
||||
ms.contentlocale: ja-JP
|
||||
ms.lasthandoff: 09/05/2022
|
||||
ms.locfileid: '147525714'
|
||||
ms.lasthandoff: 09/11/2022
|
||||
ms.locfileid: '147881478'
|
||||
---
|
||||
{% ifversion ghes < 3.5 or ghae %} {% data reusables.security-overview.beta %} {% endif %}
|
||||
|
||||
|
||||
@@ -16,11 +16,11 @@ topics:
|
||||
- Teams
|
||||
shortTitle: Filtering alerts
|
||||
ms.openlocfilehash: c2ea05ce5c2e65717088324fe818cb58e7a33093
|
||||
ms.sourcegitcommit: fcf3546b7cc208155fb8acdf68b81be28afc3d2d
|
||||
ms.sourcegitcommit: fb047f9450b41b24afc43d9512a5db2a2b750a2a
|
||||
ms.translationtype: HT
|
||||
ms.contentlocale: ja-JP
|
||||
ms.lasthandoff: 09/10/2022
|
||||
ms.locfileid: '147880751'
|
||||
ms.locfileid: '147880767'
|
||||
---
|
||||
{% ifversion ghes < 3.5 or ghae %} {% data reusables.security-overview.beta %} {% endif %}
|
||||
|
||||
|
||||
@@ -16,11 +16,11 @@ topics:
|
||||
- Security
|
||||
- Accounts
|
||||
ms.openlocfilehash: 4225b80d139462fd64e440947c1eba9adb817294
|
||||
ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5
|
||||
ms.sourcegitcommit: 770ed406ec075528ec9c9695aa4bfdc8c8b25fd3
|
||||
ms.translationtype: HT
|
||||
ms.contentlocale: ja-JP
|
||||
ms.lasthandoff: 09/05/2022
|
||||
ms.locfileid: '146058286'
|
||||
ms.lasthandoff: 09/11/2022
|
||||
ms.locfileid: '147883410'
|
||||
---
|
||||
## このガイドについて
|
||||
|
||||
|
||||
@@ -21,11 +21,11 @@ topics:
|
||||
- Repositories
|
||||
shortTitle: Explore dependencies
|
||||
ms.openlocfilehash: f3735844ad8bcb8fba799723f30a3d55e41ec158
|
||||
ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5
|
||||
ms.sourcegitcommit: 5f9527483381cfb1e41f2322f67c80554750a47d
|
||||
ms.translationtype: HT
|
||||
ms.contentlocale: ja-JP
|
||||
ms.lasthandoff: 09/05/2022
|
||||
ms.locfileid: '147526863'
|
||||
ms.lasthandoff: 09/11/2022
|
||||
ms.locfileid: '147882732'
|
||||
---
|
||||
<!--For this article in earlier GHES versions, see /content/github/visualizing-repository-data-with-graphs-->
|
||||
|
||||
|
||||
@@ -10,11 +10,11 @@ topics:
|
||||
versions:
|
||||
feature: dependency-submission-api
|
||||
ms.openlocfilehash: f81967a46763d299afd14727cd884a36cb0b3d9c
|
||||
ms.sourcegitcommit: fcf3546b7cc208155fb8acdf68b81be28afc3d2d
|
||||
ms.sourcegitcommit: fb047f9450b41b24afc43d9512a5db2a2b750a2a
|
||||
ms.translationtype: HT
|
||||
ms.contentlocale: ja-JP
|
||||
ms.lasthandoff: 09/10/2022
|
||||
ms.locfileid: '147880743'
|
||||
ms.locfileid: '147880815'
|
||||
---
|
||||
{% data reusables.dependency-submission.dependency-submission-api-beta %}
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
title: Using the Visual Studio Code Command Palette in GitHub Codespaces
|
||||
intro: 'You can use the Command Palette feature of {% data variables.product.prodname_vscode %} to access many commands in {% data variables.product.prodname_github_codespaces %}.'
|
||||
title: GitHub Codespaces で Visual Studio Code のコマンド パレットを使う
|
||||
intro: '{% data variables.product.prodname_vscode %} のコマンド パレット機能を使用して、{% data variables.product.prodname_github_codespaces %} 内の多くのコマンドにアクセスできます。'
|
||||
versions:
|
||||
fpt: '*'
|
||||
ghec: '*'
|
||||
@@ -13,56 +13,61 @@ shortTitle: VS Code Command Palette
|
||||
allowTitleToDifferFromFilename: true
|
||||
redirect_from:
|
||||
- /codespaces/codespaces-reference/using-the-command-palette-in-codespaces
|
||||
ms.openlocfilehash: cefa91dd9549aaf89ee127585ac34a91e25c80d1
|
||||
ms.sourcegitcommit: 478f2931167988096ae6478a257f492ecaa11794
|
||||
ms.translationtype: HT
|
||||
ms.contentlocale: ja-JP
|
||||
ms.lasthandoff: 09/09/2022
|
||||
ms.locfileid: '147760832'
|
||||
---
|
||||
## {% data variables.product.prodname_vscode_command_palette %}について
|
||||
|
||||
## About the {% data variables.product.prodname_vscode_command_palette %}
|
||||
コマンド パレットは、{% data variables.product.prodname_github_codespaces %} で使用できる {% data variables.product.prodname_vscode %} の中心的な機能の 1 つです。 コマンドパレットを使用すると、{% data variables.product.prodname_codespaces %} および {% data variables.product.prodname_vscode_shortname %} の多くのコマンドにアクセスできます。 {% data variables.product.prodname_vscode_command_palette_shortname %}を使うことについて詳しくは、{% data variables.product.prodname_vscode_shortname %} のドキュメントの「[ユーザー インターフェイス](https://code.visualstudio.com/docs/getstarted/userinterface#_command-palette)」を参照してください。
|
||||
|
||||
The Command Palette is one of the focal features of {% data variables.product.prodname_vscode %} and is available for you to use in {% data variables.product.prodname_github_codespaces %}. The Command Palette allows you to access many commands for {% data variables.product.prodname_codespaces %} and {% data variables.product.prodname_vscode_shortname %}. For more information on using the {% data variables.product.prodname_vscode_command_palette_shortname %}, see "[User Interface](https://code.visualstudio.com/docs/getstarted/userinterface#_command-palette)" in the {% data variables.product.prodname_vscode_shortname %} documentation.
|
||||
## {% data variables.product.prodname_vscode_command_palette_shortname %}にアクセスする
|
||||
|
||||
## Accessing the {% data variables.product.prodname_vscode_command_palette_shortname %}
|
||||
{% data variables.product.prodname_vscode_command_palette_shortname %}には多くの方法でアクセスできます。
|
||||
|
||||
You can access the {% data variables.product.prodname_vscode_command_palette_shortname %} in a number of ways.
|
||||
- <kbd>Shift</kbd>+<kbd>Command</kbd>+<kbd>P</kbd> (Mac) / <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>P</kbd> (Windows/Linux)。
|
||||
|
||||
- <kbd>Shift</kbd>+<kbd>Command</kbd>+<kbd>P</kbd> (Mac) / <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>P</kbd> (Windows/Linux).
|
||||
|
||||
Note that this command is a reserved keyboard shortcut in Firefox.
|
||||
このコマンドは Firefox で指定されているキーボードショートカットになりますので、ご注意ください。
|
||||
- <kbd>F1</kbd>
|
||||
- From the Application Menu, click **View > Command Palette…**.
|
||||
- [アプリケーション] メニューの **[表示] > [コマンド パレット]...** をクリックします。
|
||||
|
||||

|
||||

|
||||
|
||||
## Commands for {% data variables.product.prodname_codespaces %}
|
||||
## {% data variables.product.prodname_codespaces %} 用のコマンド
|
||||
|
||||
To see all commands related to {% data variables.product.prodname_codespaces %}, [access the {% data variables.product.prodname_vscode_command_palette_shortname %}](#accessing-the-command-palette), then start typing "Codespaces".
|
||||
{% data variables.product.prodname_codespaces %} に関連するコマンドをすべて表示するには、[{% data variables.product.prodname_vscode_command_palette_shortname %} にアクセス](#accessing-the-command-palette)してから、「Codespaces」と入力します。
|
||||
|
||||

|
||||

|
||||
|
||||
### Suspending or stopping a codespace
|
||||
### Codespace のサスペンドまたは停止
|
||||
|
||||
If you add a new secret or change the machine type, you'll have to stop and restart the codespace for it to apply your changes.
|
||||
新しいシークレットを追加したり、マシンの種類を変更した場合、codespace を停止および再起動して変更を適用する必要があります。
|
||||
|
||||
To suspend or stop your codespace's container, [access the {% data variables.product.prodname_vscode_command_palette_shortname %}](#accessing-the-command-palette), then start typing "stop". Select **Codespaces: Stop Current Codespace**.
|
||||
codespace のコンテナーを中断または停止するには、[{% data variables.product.prodname_vscode_command_palette_shortname %}にアクセス](#accessing-the-command-palette)し、「停止」と入力します。 **[Codespaces: 現在の Codespace を停止]** を選びます。
|
||||
|
||||

|
||||

|
||||
|
||||
### Adding a dev container from a template
|
||||
### テンプレートから開発コンテナを追加する
|
||||
|
||||
To add a dev container from a template, [access the {% data variables.product.prodname_vscode_command_palette_shortname %}](#accessing-the-command-palette), then start typing "dev container". Select **Codespaces: Add Development Container Configuration Files...**
|
||||
テンプレートから開発コンテナーを追加するには、[{% data variables.product.prodname_vscode_command_palette_shortname %}にアクセス](#accessing-the-command-palette)し、「開発コンテナー」と入力します。 **[Codespaces: 開発コンテナー構成ファイルの追加...]** を選びます。
|
||||
|
||||

|
||||

|
||||
|
||||
### Rebuilding a codespace
|
||||
### Codespace を再構築する
|
||||
|
||||
If you add a dev container or edit any of the configuration files (`devcontainer.json` and `Dockerfile`), you'll have to rebuild your codespace for it to apply your changes.
|
||||
開発コンテナーを追加したり、構成ファイル (`devcontainer.json` および `Dockerfile`) のいずれかを編集した場合、codespace を再構築して変更を適用する必要があります。
|
||||
|
||||
To rebuild your container, [access the {% data variables.product.prodname_vscode_command_palette_shortname %}](#accessing-the-command-palette), then start typing "rebuild". Select **Codespaces: Rebuild Container**.
|
||||
コンテナーを再構築するには、[{% data variables.product.prodname_vscode_command_palette_shortname %}にアクセス](#accessing-the-command-palette)し、「再構築」と入力します。 **[Codespaces: コンテナーのリビルド]** を選択します。
|
||||
|
||||

|
||||

|
||||
|
||||
### Codespaces logs
|
||||
### Codespace のログ
|
||||
|
||||
You can use the {% data variables.product.prodname_vscode_command_palette_shortname %} to access the codespace creation logs, or you can use it export all logs.
|
||||
{% data variables.product.prodname_vscode_command_palette_shortname %}を使うと、codespace 作成ログにアクセスすることも、すべてのログをエクスポートすることもできます。
|
||||
|
||||
To retrieve the logs for {% data variables.product.prodname_codespaces %}, [access the {% data variables.product.prodname_vscode_command_palette_shortname %}](#accessing-the-command-palette), then start typing "log". Select **Codespaces: Export Logs** to export all logs related to {% data variables.product.prodname_codespaces %} or select **Codespaces: View Creation Logs** to view logs related to the setup.
|
||||
{% data variables.product.prodname_codespaces %} のログを取得するには、[{% data variables.product.prodname_vscode_command_palette_shortname %} にアクセス](#accessing-the-command-palette)してから、「ログ」と入力します。 **[Codespaces: ログのエクスポート]** を選び、{% data variables.product.prodname_codespaces %} に関連するすべてのログをエクスポートするか、 **[Codespaces: 作成ログの表示]** を選び、セットアップに関連するログを表示します。
|
||||
|
||||

|
||||

|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
---
|
||||
title: GitHub Codespaces の既定のエディターを設定する
|
||||
title: Setting your default editor for GitHub Codespaces
|
||||
shortTitle: Set the default editor
|
||||
intro: '個人用設定ページで、{% data variables.product.prodname_codespaces %} の既定のエディターを設定できます。'
|
||||
intro: '{% data reusables.codespaces.about-changing-default-editor %}'
|
||||
product: '{% data reusables.gated-features.codespaces %}'
|
||||
versions:
|
||||
fpt: '*'
|
||||
@@ -12,20 +12,17 @@ redirect_from:
|
||||
topics:
|
||||
- Codespaces
|
||||
type: how_to
|
||||
ms.openlocfilehash: 7cfc188cb265482ea9dd40f3fc653af870aa6982
|
||||
ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5
|
||||
ms.translationtype: HT
|
||||
ms.contentlocale: ja-JP
|
||||
ms.lasthandoff: 09/05/2022
|
||||
ms.locfileid: '147111534'
|
||||
---
|
||||
設定ページでは、エディターの基本設定を行って、新しく作成される codespace が Web 用の {% 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_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)をご覧ください。
|
||||
On the settings page, you can set your editor preference so that any newly created codespaces are opened automatically in either {% data variables.product.prodname_vscode %} for Web or the {% data variables.product.prodname_vscode %} desktop application.
|
||||
|
||||
## 既定のエディターを設定する
|
||||
If you want to use {% data variables.product.prodname_vscode %} as your default editor for {% data variables.product.prodname_codespaces %}, you need to install {% data variables.product.prodname_vscode %} and the {% data variables.product.prodname_github_codespaces %} extension for {% data variables.product.prodname_vscode %}. For more information, see the [download page for {% data variables.product.prodname_vscode %}](https://code.visualstudio.com/download/) and the [{% data variables.product.prodname_github_codespaces %} extension on the {% data variables.product.prodname_vscode %} marketplace](https://marketplace.visualstudio.com/items?itemName=GitHub.codespaces).
|
||||
|
||||
{% data reusables.user-settings.access_settings %} {% data reusables.user-settings.codespaces-tab %}
|
||||
1. [Editor preference]\(エディターの基本設定\) で、必要なオプションを選びます。
|
||||
 **{% data variables.product.prodname_vscode %}** を選ぶと、次に codespace を作成するときに、{% data variables.product.prodname_codespaces %} がデスクトップ アプリケーションで自動的に開きます。 正常に開かれるには、ブラウザーと {% data variables.product.prodname_vscode %} の両方へのアクセスを許可することが必要な場合があります。
|
||||

|
||||
## Setting your default editor
|
||||
|
||||
{% data reusables.user-settings.access_settings %}
|
||||
{% data reusables.user-settings.codespaces-tab %}
|
||||
1. Under "Editor preference", select the option you want.
|
||||

|
||||
If you choose **{% data variables.product.prodname_vscode %}**, {% data variables.product.prodname_codespaces %} will automatically open in the desktop application when you next create a codespace. You may need to allow access to both your browser and {% data variables.product.prodname_vscode %} for it to open successfully.
|
||||

|
||||
|
||||
@@ -24,9 +24,8 @@ There are costs associated with storing codespaces. You should therefore delete
|
||||
|
||||
{% webui %}
|
||||
|
||||
1. Navigate to the "Your Codespaces" page at [github.com/codespaces](https://github.com/codespaces).
|
||||
|
||||
2. To the right of the codespace you want to delete, click {% octicon "kebab-horizontal" aria-label="The horizontal kebab icon" %}, then click **{% octicon "trash" aria-label="The trash icon" %} Delete**
|
||||
{% data reusables.codespaces.your-codespaces-procedure-step %}
|
||||
1. To the right of the codespace you want to delete, click {% octicon "kebab-horizontal" aria-label="The horizontal kebab icon" %}, then click **{% octicon "trash" aria-label="The trash icon" %} Delete**
|
||||
|
||||

|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
title: codespace で開発する
|
||||
intro: '{% data variables.product.product_name %} で codespace を開き、{% data variables.product.prodname_vscode %} の機能を使用して開発できます。'
|
||||
title: Developing in a codespace
|
||||
intro: 'You can open a codespace on {% data variables.product.product_name %}, then develop using {% data variables.product.prodname_vscode %}''s features.'
|
||||
product: '{% data reusables.gated-features.codespaces %}'
|
||||
redirect_from:
|
||||
- /github/developing-online-with-github-codespaces/developing-in-a-codespace
|
||||
@@ -14,54 +14,43 @@ topics:
|
||||
- Fundamentals
|
||||
- Developer
|
||||
shortTitle: Develop in a codespace
|
||||
ms.openlocfilehash: 70b7b5b91e68b80033edd59ae3a7826e0e2ee25f
|
||||
ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5
|
||||
ms.translationtype: HT
|
||||
ms.contentlocale: ja-JP
|
||||
ms.lasthandoff: 09/05/2022
|
||||
ms.locfileid: '147614352'
|
||||
---
|
||||
## {% data variables.product.prodname_github_codespaces %} での開発について
|
||||
|
||||
{% data variables.product.prodname_github_codespaces %} は、{% data variables.product.prodname_vscode %} の完全な開発体験を提供します。 {% data reusables.codespaces.use-visual-studio-features %}
|
||||
|
||||
|
||||
## About development with {% data variables.product.prodname_github_codespaces %}
|
||||
|
||||
{% data variables.product.prodname_github_codespaces %} provides you with the full development experience of {% data variables.product.prodname_vscode %}. {% data reusables.codespaces.use-visual-studio-features %}
|
||||
|
||||
{% data reusables.codespaces.links-to-get-started %}
|
||||
|
||||

|
||||

|
||||
|
||||
1. サイドバー: デフォルト設定では、このエリアには Explorer でプロジェクトファイルが表示されます。
|
||||
2. アクティビティバー: ビューが表示され、それらを切り替える方法が提供されます。 ビューはドラッグアンドドロップで並べ替えることができます。
|
||||
3. エディタ: ファイルを編集できます。 各エディタのタブを使用して、必要な場所に正確に配置できます。
|
||||
4. パネル: 出力とデバッグ情報、および統合ターミナルのデフォルトの場所を確認できます。
|
||||
5. ステータスバー: このエリアには、codespace とプロジェクトに関する有用な情報が表示されます。 たとえば、ブランチ名、設定されたポートなどです。
|
||||
1. Side Bar - By default, this area shows your project files in the Explorer.
|
||||
2. Activity Bar - This displays the Views and provides you with a way to switch between them. You can reorder the Views by dragging and dropping them.
|
||||
3. Editor - This is where you edit your files. You can use the tab for each editor to position it exactly where you need it.
|
||||
4. Panels - This is where you can see output and debug information, as well as the default place for the integrated Terminal.
|
||||
5. Status Bar - This area provides you with useful information about your codespace and project. For example, the branch name, configured ports, and more.
|
||||
|
||||
{% data variables.product.prodname_vscode_shortname %} の使用方法の詳しい情報については、{% data variables.product.prodname_vscode_shortname %} ドキュメントで[ユーザー インターフェイス ガイド](https://code.visualstudio.com/docs/getstarted/userinterface)を参照してください。
|
||||
For more information on using {% data variables.product.prodname_vscode_shortname %}, see the [User Interface guide](https://code.visualstudio.com/docs/getstarted/userinterface) in the {% data variables.product.prodname_vscode_shortname %} documentation.
|
||||
|
||||
{% data reusables.codespaces.connect-to-codespace-from-vscode %}
|
||||
|
||||
{% data reusables.codespaces.use-chrome %} 詳しい情報については、「[Codespace クライアントのトラブルシューティング](/codespaces/troubleshooting/troubleshooting-codespaces-clients)」を参照してください。
|
||||
{% data reusables.codespaces.use-chrome %} For more information, see "[Troubleshooting Codespaces clients](/codespaces/troubleshooting/troubleshooting-codespaces-clients)."
|
||||
|
||||
### Codespace をパーソナライズする
|
||||
### Personalizing your codespace
|
||||
|
||||
{% data reusables.codespaces.about-personalization %} 詳しくは、「[アカウントの {% data variables.product.prodname_github_codespaces %} をパーソナライズする](/codespaces/customizing-your-codespace/personalizing-github-codespaces-for-your-account)」をご覧ください。
|
||||
{% data reusables.codespaces.about-personalization %} For more information, see "[Personalizing {% data variables.product.prodname_github_codespaces %} for your account](/codespaces/customizing-your-codespace/personalizing-github-codespaces-for-your-account)."
|
||||
|
||||
{% data reusables.codespaces.apply-devcontainer-changes %} 詳しい情報については、[プロジェクトの {% data variables.product.prodname_codespaces %} の構成](/github/developing-online-with-codespaces/configuring-codespaces-for-your-project#apply-changes-to-your-configuration)に関するページを参照してください。
|
||||
{% data reusables.codespaces.apply-devcontainer-changes %} For more information, see "[Configuring {% data variables.product.prodname_codespaces %} for your project](/github/developing-online-with-codespaces/configuring-codespaces-for-your-project#apply-changes-to-your-configuration)."
|
||||
|
||||
### Codespace からアプリケーションを実行する
|
||||
{% data reusables.codespaces.about-port-forwarding %} 詳しい情報については、「[Codespace でポートを転送する](/github/developing-online-with-codespaces/forwarding-ports-in-your-codespace)」を参照してください。
|
||||
### Running your app from a codespace
|
||||
{% data reusables.codespaces.about-port-forwarding %} For more information, see "[Forwarding ports in your codespace](/github/developing-online-with-codespaces/forwarding-ports-in-your-codespace)."
|
||||
|
||||
### 変更をコミットする
|
||||
### Committing your changes
|
||||
|
||||
{% data reusables.codespaces.committing-link-to-procedure %}
|
||||
|
||||
### {% data variables.product.prodname_vscode_command_palette %} を使用する
|
||||
### Using the {% data variables.product.prodname_vscode_command_palette %}
|
||||
|
||||
{% data variables.product.prodname_vscode_command_palette %} を使用すると、{% data variables.product.prodname_codespaces %} と {% data variables.product.prodname_vscode_shortname %} で多くの機能を利用したり、管理したりすることができます。 詳しい情報については、「[{% data variables.product.prodname_vscode_command_palette_shortname %} in {% data variables.product.prodname_codespaces %} を使用する](/codespaces/codespaces-reference/using-the-vs-code-command-palette-in-codespaces)」を参照してください。
|
||||
|
||||
## 既存の codespace に移動する
|
||||
|
||||
1. {% data reusables.codespaces.you-can-see-all-your-codespaces %}
|
||||
2. 開発する codespace の名前をクリックします。
|
||||

|
||||
|
||||
または、リポジトリに移動して、 **{% octicon "code" aria-label="The code icon" %} Code** を選択することで、そのリポジトリのアクティブな codespace を表示することもできます。 ドロップダウン メニューには、リポジトリのすべてのアクティブな codespace が表示されます。
|
||||
The {% data variables.product.prodname_vscode_command_palette %} allows you to access and manage many features for {% data variables.product.prodname_codespaces %} and {% data variables.product.prodname_vscode_shortname %}. For more information, see "[Using the {% data variables.product.prodname_vscode_command_palette_shortname %} in {% data variables.product.prodname_codespaces %}](/codespaces/codespaces-reference/using-the-vs-code-command-palette-in-codespaces)."
|
||||
@@ -14,10 +14,10 @@ topics:
|
||||
- Developer
|
||||
shortTitle: Forward ports
|
||||
ms.openlocfilehash: b7309a1f2f878860bd9faf34b5516bd10ef80887
|
||||
ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5
|
||||
ms.sourcegitcommit: 80842b4e4c500daa051eff0ccd7cde91c2d4bb36
|
||||
ms.translationtype: HT
|
||||
ms.contentlocale: ja-JP
|
||||
ms.lasthandoff: 09/05/2022
|
||||
ms.lasthandoff: 09/12/2022
|
||||
ms.locfileid: '147110691'
|
||||
---
|
||||
## 転送されるポートについて
|
||||
|
||||
@@ -9,8 +9,9 @@ topics:
|
||||
- Codespaces
|
||||
children:
|
||||
- /codespaces-lifecycle
|
||||
- /creating-a-codespace
|
||||
- /developing-in-a-codespace
|
||||
- /creating-a-codespace
|
||||
- /opening-an-existing-codespace
|
||||
- /using-source-control-in-your-codespace
|
||||
- /using-github-codespaces-for-pull-requests
|
||||
- /stopping-and-starting-a-codespace
|
||||
|
||||
@@ -14,10 +14,10 @@ topics:
|
||||
redirect_from:
|
||||
- /codespaces/developing-in-codespaces/using-codespaces-for-pull-requests
|
||||
ms.openlocfilehash: d4ac4d4b8003600c95293f3939f547cd73639884
|
||||
ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5
|
||||
ms.sourcegitcommit: 80842b4e4c500daa051eff0ccd7cde91c2d4bb36
|
||||
ms.translationtype: HT
|
||||
ms.contentlocale: ja-JP
|
||||
ms.lasthandoff: 09/05/2022
|
||||
ms.lasthandoff: 09/12/2022
|
||||
ms.locfileid: '147111523'
|
||||
---
|
||||
## {% data variables.product.prodname_github_codespaces %} での pull request について
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
title: Visual Studio Code で GitHub Codespaces を使用する
|
||||
intro: '{% data variables.product.product_name %} のアカウントに {% data variables.product.prodname_github_codespaces %} 拡張機能を接続することで、{% data variables.product.prodname_vscode %} で codespace を直接開発できます。'
|
||||
title: Using GitHub Codespaces in Visual Studio Code
|
||||
intro: 'You can develop in your codespace directly in {% data variables.product.prodname_vscode %} by connecting the {% data variables.product.prodname_github_codespaces %} extension with your account on {% data variables.product.product_name %}.'
|
||||
product: '{% data reusables.gated-features.codespaces %}'
|
||||
redirect_from:
|
||||
- /github/developing-online-with-codespaces/using-codespaces-in-visual-studio-code
|
||||
@@ -16,105 +16,101 @@ topics:
|
||||
- Visual Studio Code
|
||||
- Developer
|
||||
shortTitle: Visual Studio Code
|
||||
ms.openlocfilehash: fd714af8374346768b81241ea6b8b91a0022c4e4
|
||||
ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5
|
||||
ms.translationtype: HT
|
||||
ms.contentlocale: ja-JP
|
||||
ms.lasthandoff: 09/05/2022
|
||||
ms.locfileid: '147111514'
|
||||
---
|
||||
## {% data variables.product.prodname_vscode %} の {% data variables.product.prodname_github_codespaces %} について
|
||||
|
||||
{% data variables.product.prodname_vscode %} のローカル インストールを使用して、codespace の作成、管理、作業、削除を行うことができます。 {% data variables.product.prodname_vscode_shortname %} で {% data variables.product.prodname_github_codespaces %} を使用するには、{% data variables.product.prodname_codespaces %} 拡張機能をインストールする必要があります。 {% data variables.product.prodname_vscode_shortname %} での Codespaces の設定の詳細については、「[前提条件](#prerequisites)」を参照してください。
|
||||
|
||||
## About {% data variables.product.prodname_github_codespaces %} in {% data variables.product.prodname_vscode %}
|
||||
|
||||
既定では、{% data variables.product.prodname_dotcom_the_website %} で作成した新しい codespace は、ブラウザーで開きます。 {% data variables.product.prodname_vscode_shortname %} で新しい codespace を自動的に開きたい場合は、既定のエディターを {% data variables.product.prodname_vscode_shortname %} に設定できます。 詳しくは、「[{% data variables.product.prodname_github_codespaces %} の既定のエディターを設定する](/codespaces/customizing-your-codespace/setting-your-default-editor-for-github-codespaces)」をご覧ください。
|
||||
You can use your local install of {% data variables.product.prodname_vscode %} to create, manage, work in, and delete codespaces. {% data reusables.codespaces.using-codespaces-in-vscode %} For more information on setting up {% data variables.product.prodname_github_codespaces %} in {% data variables.product.prodname_vscode_shortname %}, see "[Prerequisites](#prerequisites)."
|
||||
|
||||
ブラウザーで作業したいが、既存の {% data variables.product.prodname_vscode_shortname %} 拡張機能、テーマ、ショートカットを引き続き使用する場合は、Settings Sync を有効にすることができます。詳しくは、「[アカウントの {% data variables.product.prodname_github_codespaces %} をパーソナライズする](/codespaces/customizing-your-codespace/personalizing-github-codespaces-for-your-account#settings-sync)」をご覧ください。
|
||||
By default, if you create a new codespace on {% data variables.product.prodname_dotcom_the_website %}, it will open in the browser. If you would prefer to open any new codespaces in {% data variables.product.prodname_vscode_shortname %} automatically, you can set your default editor to be {% data variables.product.prodname_vscode_shortname %}. For more information, see "[Setting your default editor for {% data variables.product.prodname_github_codespaces %}](/codespaces/customizing-your-codespace/setting-your-default-editor-for-github-codespaces)."
|
||||
|
||||
## 前提条件
|
||||
If you prefer to work in the browser, but want to continue using your existing {% data variables.product.prodname_vscode_shortname %} extensions, themes, and shortcuts, you can turn on Settings Sync. For more information, see "[Personalizing {% data variables.product.prodname_github_codespaces %} for your account](/codespaces/customizing-your-codespace/personalizing-github-codespaces-for-your-account#settings-sync)."
|
||||
|
||||
{% data variables.product.prodname_vscode_shortname %} の codespace で直接開発するには、{% data variables.product.prodname_codespaces %} 拡張機能をインストールして、{% data variables.product.product_name %} 資格情報を使用してサインインする必要があります。 {% data variables.product.prodname_codespaces %} 拡張機能には、{% data variables.product.prodname_vscode_shortname %} October 2020 リリース 1.51 以降が必要です。
|
||||
## Prerequisites
|
||||
|
||||
{% data variables.product.prodname_vscode_marketplace %} を使用して [{% data variables.product.prodname_codespaces %}](https://marketplace.visualstudio.com/items?itemName=GitHub.codespaces) 拡張機能をインストールします。 詳細については、{% data variables.product.prodname_vscode_shortname %} ドキュメントの「[拡張機能マーケットプレース](https://code.visualstudio.com/docs/editor/extension-gallery)」を参照してください。
|
||||
To develop in a codespace directly in {% data variables.product.prodname_vscode_shortname %}, you must install and sign into the {% data variables.product.prodname_codespaces %} extension with your {% data variables.product.product_name %} credentials. The {% data variables.product.prodname_codespaces %} extension requires {% data variables.product.prodname_vscode_shortname %} October 2020 Release 1.51 or later.
|
||||
|
||||
Use the {% data variables.product.prodname_vscode_marketplace %} to install the [{% data variables.product.prodname_codespaces %}](https://marketplace.visualstudio.com/items?itemName=GitHub.codespaces) extension. For more information, see [Extension Marketplace](https://code.visualstudio.com/docs/editor/extension-gallery) in the {% data variables.product.prodname_vscode_shortname %} documentation.
|
||||
|
||||
|
||||
{% mac %}
|
||||
|
||||
{% data reusables.codespaces.click-remote-explorer-icon-vscode %}
|
||||
1. **[サインインして {% data variables.product.prodname_dotcom %} を表示...]** をクリックします。
|
||||
1. Click **Sign in to view {% data variables.product.prodname_dotcom %}...**.
|
||||
|
||||
![[Signing in to view {% 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 %} にサインインします。
|
||||
2. To authorize {% data variables.product.prodname_vscode_shortname %} to access your account on {% data variables.product.product_name %}, click **Allow**.
|
||||
3. Sign in to {% data variables.product.product_name %} to approve the extension.
|
||||
|
||||
{% endmac %}
|
||||
|
||||
{% windows %}
|
||||
|
||||
{% data reusables.codespaces.click-remote-explorer-icon-vscode %}
|
||||
1. [REMOTE EXPLORER] ドロップダウンを使用して、 **{% data variables.product.prodname_github_codespaces %}** をクリックします。
|
||||
1. Use the "REMOTE EXPLORER" drop-down, then click **{% data variables.product.prodname_github_codespaces %}**.
|
||||
|
||||

|
||||

|
||||
|
||||
1. **[サインインして {% data variables.product.prodname_codespaces %} を表示...]** をクリックします。
|
||||
1. Click **Sign in to view {% data variables.product.prodname_codespaces %}...**.
|
||||
|
||||
![[Signing in to view {% 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 %} にサインインします。
|
||||
1. To authorize {% data variables.product.prodname_vscode_shortname %} to access your account on {% data variables.product.product_name %}, click **Allow**.
|
||||
1. Sign in to {% data variables.product.product_name %} to approve the extension.
|
||||
|
||||
{% endwindows %}
|
||||
|
||||
## {% data variables.product.prodname_vscode_shortname %} で Codespaces を作成する
|
||||
## Creating a codespace in {% data variables.product.prodname_vscode_shortname %}
|
||||
|
||||
{% data reusables.codespaces.creating-a-codespace-in-vscode %}
|
||||
|
||||
## {% data variables.product.prodname_vscode_shortname %} で codespace を開く
|
||||
## Opening a codespace in {% data variables.product.prodname_vscode_shortname %}
|
||||
|
||||
{% data reusables.codespaces.click-remote-explorer-icon-vscode %}
|
||||
1. [Codespaces] で、開発するコードスペースをクリックします。
|
||||
1. [Connect to Codespace] アイコンをクリックします。
|
||||
1. Under "Codespaces", click the codespace you want to develop in.
|
||||
1. Click the Connect to Codespace icon.
|
||||
|
||||
![{% data variables.product.prodname_vscode_shortname %} の [Connect to Codespace]\(Codespace への接続\) アイコン](/assets/images/help/codespaces/click-connect-to-codespace-icon-vscode.png)
|
||||

|
||||
|
||||
## {% data variables.product.prodname_vscode_shortname %} のマシンの種類の変更
|
||||
## Changing the machine type in {% data variables.product.prodname_vscode_shortname %}
|
||||
|
||||
{% data reusables.codespaces.codespaces-machine-types %} codespace のマシンの種類はいつでも変更できます。
|
||||
{% data reusables.codespaces.codespaces-machine-types %} You can change the machine type of your codespace at any time.
|
||||
|
||||
1. {% data variables.product.prodname_vscode_shortname %} で、コマンド パレットを開きます (`shift command P` / `shift control P`)。
|
||||
1. 「Codespaces: マシンの種類の変更」を検索して選択します。
|
||||
1. In {% data variables.product.prodname_vscode_shortname %}, open the Command Palette (`shift command P` / `shift control P`).
|
||||
1. Search for and select "Codespaces: Change Machine Type."
|
||||
|
||||

|
||||

|
||||
|
||||
1. 変更したい codespace をクリックします。
|
||||
1. Click the codespace that you want to change.
|
||||
|
||||

|
||||

|
||||
|
||||
1. 使用したいマシンの種類を選択します。
|
||||
1. Choose the machine type you want to use.
|
||||
|
||||
{% note %}
|
||||
|
||||
**注**: {% data reusables.codespaces.codespaces-machine-type-availability %}
|
||||
**Note**: {% data reusables.codespaces.codespaces-machine-type-availability %}
|
||||
|
||||
{% endnote %}
|
||||
|
||||
1. codespace が現在実行中の場合は、今すぐ再起動して codespace に再接続するかどうかを確認するメッセージが表示されます。
|
||||
1. If the codespace is currently running, a message is displayed asking if you would like to restart and reconnect to your codespace now.
|
||||
|
||||
この codespace に使用するマシンの種類をすぐに変更したい場合は、 **[はい]** をクリックします。
|
||||
Click **Yes** if you want to change the machine type used for this codespace immediately.
|
||||
|
||||
**[いいえ]** をクリックした場合、または codespace が現在実行されていない場合は、次回 codespace が再起動されたときに変更が有効になります。
|
||||
If you click **No**, or if the codespace is not currently running, the change will take effect the next time the codespace restarts.
|
||||
|
||||
## {% data variables.product.prodname_vscode_shortname %} で Codespaces を削除する
|
||||
## Deleting a codespace in {% data variables.product.prodname_vscode_shortname %}
|
||||
|
||||
{% data reusables.codespaces.deleting-a-codespace-in-vscode %}
|
||||
|
||||
## {% data variables.product.prodname_vscode_shortname %} の Insider ビルドへの切り替え
|
||||
## Switching to the Insiders build of {% data variables.product.prodname_vscode_shortname %}
|
||||
|
||||
{% data variables.product.prodname_codespaces %} 内で [{% data variables.product.prodname_vscode_shortname %} の Insiders ビルド](https://code.visualstudio.com/docs/setup/setup-overview#_insiders-nightly-build)を使用できます。
|
||||
You can use the [Insiders Build of {% data variables.product.prodname_vscode_shortname %}](https://code.visualstudio.com/docs/setup/setup-overview#_insiders-nightly-build) within {% data variables.product.prodname_codespaces %}.
|
||||
|
||||
1. {% data variables.product.prodname_codespaces %} ウィンドウの左下にある **{% octicon "gear" aria-label="The settings icon" %} [設定]** を選択します。
|
||||
2. 一覧から [Insiders バージョンに切り替える] を選択します。
|
||||
1. In bottom left of your {% data variables.product.prodname_codespaces %} window, select **{% octicon "gear" aria-label="The settings icon" %} Settings**.
|
||||
2. From the list, select "Switch to Insiders Version".
|
||||
|
||||
![{% data variables.product.prodname_codespaces %} で [Insiders ビルド] をクリックする](/assets/images/help/codespaces/codespaces-insiders-vscode.png)
|
||||
3. 選択すると、{% data variables.product.prodname_codespaces %} は Insiders バージョンで引き続き開きます。
|
||||

|
||||
3. Once selected, {% data variables.product.prodname_codespaces %} will continue to open in Insiders Version.
|
||||
|
||||
@@ -10,10 +10,10 @@ children:
|
||||
- /quickstart
|
||||
- /deep-dive
|
||||
ms.openlocfilehash: 072764dd2ec164cc97a0699fb7d8821e25b04aab
|
||||
ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5
|
||||
ms.sourcegitcommit: 5f9527483381cfb1e41f2322f67c80554750a47d
|
||||
ms.translationtype: HT
|
||||
ms.contentlocale: ja-JP
|
||||
ms.lasthandoff: 09/05/2022
|
||||
ms.locfileid: '147145122'
|
||||
ms.lasthandoff: 09/12/2022
|
||||
ms.locfileid: '147887448'
|
||||
---
|
||||
|
||||
|
||||
@@ -22,6 +22,7 @@ includeGuides:
|
||||
- /codespaces/developing-in-codespaces/developing-in-a-codespace
|
||||
- /codespaces/developing-in-codespaces/deleting-a-codespace
|
||||
- /codespaces/developing-in-codespaces/forwarding-ports-in-your-codespace
|
||||
- /codespaces/developing-in-codespaces/opening-an-existing-codespace
|
||||
- /codespaces/developing-in-codespaces/stopping-and-starting-a-codespace
|
||||
- /codespaces/developing-in-codespaces/using-codespaces-in-visual-studio-code
|
||||
- /codespaces/developing-in-codespaces/using-codespaces-with-github-cli
|
||||
|
||||
@@ -28,6 +28,7 @@ featuredLinks:
|
||||
guideCards:
|
||||
- /codespaces/getting-started/deep-dive
|
||||
- /codespaces/developing-in-codespaces/creating-a-codespace
|
||||
- /codespaces/developing-in-codespaces/opening-an-existing-codespace
|
||||
- /codespaces/developing-in-codespaces/using-codespaces-in-visual-studio-code
|
||||
- /codespaces/setting-up-your-codespace/personalizing-codespaces-for-your-account
|
||||
popularHeading: Set up your project
|
||||
|
||||
@@ -0,0 +1,57 @@
|
||||
---
|
||||
title: 組織内の codespace を一覧表示する
|
||||
shortTitle: List organization codespaces
|
||||
intro: 組織に対して現在アクティブになっているまたは停止している codespace をすべて一覧表示できます。
|
||||
product: '{% data reusables.gated-features.codespaces %}'
|
||||
permissions: 'To list all of the current codespaces for your organization, you must be an organization owner.'
|
||||
versions:
|
||||
fpt: '*'
|
||||
ghec: '*'
|
||||
type: how_to
|
||||
topics:
|
||||
- Codespaces
|
||||
- Administrator
|
||||
ms.openlocfilehash: 72d59c35641dd77b4d3623cc70b12b5be880be34
|
||||
ms.sourcegitcommit: 478f2931167988096ae6478a257f492ecaa11794
|
||||
ms.translationtype: HT
|
||||
ms.contentlocale: ja-JP
|
||||
ms.lasthandoff: 09/09/2022
|
||||
ms.locfileid: '147865220'
|
||||
---
|
||||
## 概要
|
||||
|
||||
組織の所有者は、組織に対して現在アクティブになっているまたは停止している codespace をすべて一覧表示できます。 これを行って、ユーザーが作成している codespace の数を確認し、不要なコストが発生していないことを確認することをお勧めします。
|
||||
|
||||
組織用の codespace を一覧表示する最も簡単な方法は、{% data variables.product.prodname_cli %} を使用することです。 REST API を使用することもできます。これにより、各 codespace に関する詳しい情報を確認できます。
|
||||
|
||||
### {% data variables.product.prodname_cli %} を使用して codespace を一覧表示する
|
||||
|
||||
指定した組織に対する現在の codespace をすべて一覧表示するには、次のコマンドを使用します。
|
||||
|
||||
```shell{:copy}
|
||||
gh codespace list --org ORGANIZATION
|
||||
```
|
||||
|
||||
このコマンドを実行すると、codespace ごとに次の情報を含むリストが返されます。
|
||||
- 名前と表示名
|
||||
- codespace を作成したユーザー
|
||||
- リポジトリとブランチ
|
||||
- codespace の現在の状態
|
||||
|
||||
特定のユーザーによって作成された、組織向けの現在の codespace をすべて一覧表示するには、次のコマンドを使用します。
|
||||
|
||||
```shell{:copy}
|
||||
gh codespace list --org ORGANIZATION --user USER
|
||||
```
|
||||
|
||||
{% note %}
|
||||
|
||||
**注**: 上記のコマンドでは、`ORGANIZATION` を、クエリを実行する組織の名前に置き換えます。 組織の所有者でなければなりません。
|
||||
|
||||
{% endnote %}
|
||||
|
||||
### REST API を使用して codespace を一覧表示する
|
||||
|
||||
組織に対する現在の codespace を一覧表示する別の方法として、`/orgs/{org}/codespaces` API エンドポイントを使用することもできます。 これを使用すると、{% data variables.product.prodname_cli %} よりも多くの情報が返されます。たとえば、マシンの種類に関する詳しい情報などです。
|
||||
|
||||
このエンドポイントについて詳しくは、「[Codespaces Organizations](/rest/codespaces/organizations#list-codespaces-for-the-organization)」を参照してください。
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
title: 開発コンテナーの概要
|
||||
intro: codespace で作業する場合、作業している環境は、仮想マシンでホストされている開発コンテナーを使用して作成されます。
|
||||
title: Introduction to dev containers
|
||||
intro: 'When you work in a codespace, the environment you are working in is created using a development container, or dev container, hosted on a virtual machine.'
|
||||
permissions: People with write permissions to a repository can create or edit the codespace configuration.
|
||||
redirect_from:
|
||||
- /github/developing-online-with-github-codespaces/configuring-github-codespaces-for-your-project
|
||||
@@ -17,74 +17,69 @@ topics:
|
||||
- Set up
|
||||
- Fundamentals
|
||||
product: '{% data reusables.gated-features.codespaces %}'
|
||||
ms.openlocfilehash: 22a227f8f97b054e4d3980876dae47d72fb03d08
|
||||
ms.sourcegitcommit: 3a16368cd8beb8b8487eb77d3e597cf49f4c4335
|
||||
ms.translationtype: HT
|
||||
ms.contentlocale: ja-JP
|
||||
ms.lasthandoff: 07/14/2022
|
||||
ms.locfileid: '147111171'
|
||||
---
|
||||
## <a name="about-dev-containers"></a>開発コンテナについて
|
||||
|
||||
開発コンテナーは、完全な機能を備えた開発環境を提供するように特別に構成された Docker コンテナーです。 codespace で作業を行うときは常に、仮想マシンで開発コンテナーを使用します。
|
||||
## About dev containers
|
||||
|
||||
リポジトリの開発コンテナーを構成できるので、そのリポジトリ用に作成された codespace によって、特定のプロジェクトの作業を行うために必要なすべてのツールとランタイムを備えた、カスタマイズされた開発環境が提供されます。 リポジトリで構成を定義しない場合、{% data variables.product.prodname_github_codespaces %} で既定の構成が使用されます。この構成には、チームがプロジェクトで開発を行うために必要な可能性がある一般的なツールの多くが含まれています。 詳しくは、「[既定の開発コンテナー構成の使用](#using-the-default-dev-container-configuration)」をご覧ください。
|
||||
Development containers, or dev containers, are Docker containers that are specifically configured to provide a full-featured development environment. Whenever you work in a codespace, you are using a dev container on a virtual machine.
|
||||
|
||||
開発コンテナーの構成ファイルは、リポジトリの `.devcontainer` ディレクトリに含まれています。 {% data variables.product.prodname_vscode %} を使用して、構成ファイルを追加できます。 さまざまなプロジェクト タイプ向けにあらかじめ定義されている構成の中から選択できます。 これらを追加の構成なしで使うこともできますし、構成を編集して生成される開発環境を改善することもできます。 詳しくは、「[事前定義済みの開発コンテナー構成の使用](#using-a-predefined-dev-container-configuration)」をご覧ください。
|
||||
You can configure the dev container for a repository so that codespaces created for that repository give you a tailored development environment, complete with all the tools and runtimes you need to work on a specific project. If you don't define a configuration in the repository then {% data variables.product.prodname_github_codespaces %} uses a default configuration, which contains many of the common tools that your team might need for development with your project. For more information, see "[Using the default dev container configuration](#using-the-default-dev-container-configuration)."
|
||||
|
||||
または、独自のカスタム構成ファイルを追加することもできます。 詳しくは、「[カスタム開発コンテナー構成の作成](#creating-a-custom-dev-container-configuration)」をご覧ください。
|
||||
The configuration files for a dev container are contained in a `.devcontainer` directory in your repository. You can use {% data variables.product.prodname_vscode %} to add configuration files for you. You can choose from a selection of predefined configurations for various project types. You can use these without further configuration, or you can edit the configurations to refine the development environment they produce. For more information, see "[Using a predefined dev container configuration](#using-a-predefined-dev-container-configuration)."
|
||||
|
||||
リポジトリ用に単一の開発コンテナー構成を定義したり、異なるブランチ用に異なる構成を定義したり、複数の構成を定義したりできます。 複数の構成を利用できる場合、ユーザーは codespace を作成するときに好みの構成を選択できます。 これは、異なるプログラミング言語のソース コードを含む大規模なリポジトリの場合や、さまざまなプロジェクトがある場合に特に役立ちます。 構成の選択肢を作成することで、異なるチームが、実行する作業用に適切に設定された codespace で作業できるようになります。
|
||||
Alternatively, you can add your own custom configuration files. For more information, see "[Creating a custom dev container configuration](#creating-a-custom-dev-container-configuration)."
|
||||
|
||||
### <a name="devcontainerjson"></a>devcontainer.json
|
||||
You can define a single dev container configuration for a repository, different configurations for different branches, or multiple configurations. When multiple configurations are available, users can choose their preferred configuration when they create a codespace. This is particularly useful for large repositories that contain source code in different programming languages or for different projects. You can create a choice of configurations that allow different teams to work in a codespace that's set up appropriately for the work they are doing.
|
||||
|
||||
開発コンテナー構成のプライマリ ファイルは `devcontainer.json` ファイルです。 このファイルを使用して、リポジトリ用に作成される codespace の環境を決定できます。 このファイルの内容によって、フレームワーク、ツール、拡張機能、ポート フォワーディングを含めることができる開発コンテナーが定義されます。 通常、`devcontainer.json` ファイルには Dockerfile (通常は `devcontainer.json` ファイルと一緒に配置します) への参照が含まれています。
|
||||
### devcontainer.json
|
||||
|
||||
リポジトリに `devcontainer.json` ファイルを追加しない場合、 既定の開発コンテナー構成が使用されます。 詳しくは、「[既定の開発コンテナー構成の使用](#using-the-default-dev-container-configuration)」をご覧ください。
|
||||
The primary file in a dev container configuration is the `devcontainer.json` file. You can use this file to determine the environment of codespaces created for your repository. The contents of this file define a dev container that can include frameworks, tools, extensions, and port forwarding. The `devcontainer.json` file usually contains a reference to a Dockerfile, which is typically located alongside the `devcontainer.json` file.
|
||||
|
||||
通常、`devcontainer.json` ファイルはリポジトリの `.devcontainer` ディレクトリに配置します。 または、リポジトリのルートに直接配置することもできます。その場合は、ファイル名の先頭をピリオドにする必要があります (`.devcontainer.json`)。
|
||||
If you don't add a `devcontainer.json` file to your repository, the default dev container configuration is used. For more information, see "[Using the default dev container configuration](#using-the-default-dev-container-configuration)."
|
||||
|
||||
リポジトリで開発コンテナー構成を選択できるようにする場合は、`.devcontainer/devcontainer.json` (または `.devcontainer.json`) ファイルに代わるファイルを `.devcontainer/SUBDIRECTORY/devcontainer.json` というパスの独自のサブディレクトリに配置する必要があります。 たとえば、次の 2 つの構成から選ぶようにすることができます。
|
||||
The `devcontainer.json` file is usually located in the `.devcontainer` directory of your repository. Alternatively, you can locate it directly in the root of the repository, in which case the file name must begin with a period: `.devcontainer.json`.
|
||||
|
||||
If you want to have a choice of dev container configurations in your repository, any alternatives to the `.devcontainer/devcontainer.json` (or `.devcontainer.json`) file must be located in their own subdirectory at the path `.devcontainer/SUBDIRECTORY/devcontainer.json`. For example, you could have a choice of two configurations:
|
||||
* `.devcontainer/database-dev/devcontainer.json`
|
||||
* `.devcontainer/gui-dev/devcontainer.json`
|
||||
|
||||
リポジトリに複数の `devcontainer.json` ファイルがある場合、各 codespace はいずれかの構成のみから作成されます。 `devcontainer.json` ファイル間で設定をインポートまたは継承することはできません。 カスタム サブディレクトリの `devcontainer.json` ファイルに依存ファイル (Dockerfile など) や `devcontainer.json` ファイル内のコマンドによって実行されるスクリプトがある場合は、これらのファイルを同じサブディレクトリに一緒に配置することをお勧めします。
|
||||
When you have multiple `devcontainer.json` files in your repository, each codespace is created from only one of the configurations. Settings cannot be imported or inherited between `devcontainer.json` files. If a `devcontainer.json` file in a custom subdirectory has dependent files, such as the Dockerfile or scripts that are run by commands in the `devcontainer.json` file, it's recommended that you co-locate these files in the same subdirectory.
|
||||
|
||||
codespace の作成時にお好みの開発コンテナー構成を選ぶ方法については、「[codespace を作成する](/codespaces/developing-in-codespaces/creating-a-codespace#creating-a-codespace)」をご覧ください。
|
||||
For information about how to choose your preferred dev container configuration when you create a codespace, see "[Creating a codespace](/codespaces/developing-in-codespaces/creating-a-codespace#creating-a-codespace)."
|
||||
|
||||
{% data reusables.codespaces.more-info-devcontainer %}
|
||||
|
||||
#### <a name="how-to-use-the-devcontainerjson"></a>devcontainer.json の使用方法
|
||||
#### How to use the devcontainer.json
|
||||
|
||||
`devcontainer.json` ファイルは、"パーソナル化" ではなく "カスタマイズ" を提供するものだと考えると有益です。 コードベースで作業するすべてのユーザーが必要とするもののみを開発環境の標準要素として含め、個人の好みのものは含めないようにする必要があります。 リンターのようなものは標準化して、すべてのユーザーにインストールするよう求めることが適切なので、`devcontainer.json` ファイルに含めることができます。 ユーザー インターフェイスのデコレーターやテーマなどは、`devcontainer.json` ファイルに含めるべきでない個人的な選択肢です。
|
||||
It's useful to think of the `devcontainer.json` file as providing "customization" rather than "personalization." You should only include things that everyone working on your codebase needs as standard elements of the development environment, not things that are personal preferences. Things like linters are good to standardize on, and to require everyone to have installed, so they're good to include in your `devcontainer.json` file. Things like user interface decorators or themes are personal choices that should not be put in the `devcontainer.json` file.
|
||||
|
||||
ドットファイルと Settings Sync を使用すると、codespace をパーソナル化できます。詳しくは、「[アカウントの {% data variables.product.prodname_github_codespaces %} をパーソナライズする](/codespaces/customizing-your-codespace/personalizing-github-codespaces-for-your-account)」をご覧ください。
|
||||
You can personalize your codespaces by using dotfiles and Settings Sync. For more information, see "[Personalizing {% data variables.product.prodname_github_codespaces %} for your account](/codespaces/customizing-your-codespace/personalizing-github-codespaces-for-your-account)."
|
||||
|
||||
### <a name="dockerfile"></a>Dockerfile
|
||||
### Dockerfile
|
||||
|
||||
開発コンテナー構成の一部として Dockerfile を追加できます。
|
||||
You can add a Dockerfile as part of your dev container configuration.
|
||||
|
||||
Dockerfile は Docker コンテナー イメージを作成するために必要な命令が含まれているテキスト ファイルです。 このイメージは、この Dockerfile を参照する `devcontainer.json` ファイルを使用して codespace を作成するたびに、開発コンテナーの生成に使用されます。 Dockerfile 内の命令は通常、作成される新しいイメージの基になる親イメージを参照することから始まります。 その後に、ソフトウェア パッケージのインストールなど、イメージの作成プロセス中に実行されるコマンドが続きます。
|
||||
The Dockerfile is a text file that contains the instructions needed to create a Docker container image. This image is used to generate a development container each time someone creates a codespace using the `devcontainer.json` file that references this Dockerfile. The instructions in the Dockerfile typically begin by referencing a parent image on which the new image that will be created is based. This is followed by commands that are run during the image creation process, for example to install software packages.
|
||||
|
||||
開発コンテナーの Dockerfile は通常、参照元の `devcontainer.json` と共に `.devcontainer` フォルダーに配置します。
|
||||
The Dockerfile for a dev container is typically located in the `.devcontainer` folder, alongside the `devcontainer.json` in which it is referenced.
|
||||
|
||||
{% note %}
|
||||
|
||||
**注**: Dockerfile を使用する代わりに、`image` プロパティを `devcontainer.json` ファイルで使用して、使用する既存のイメージを直接参照できます。 Dockerfile もイメージも見つからない場合は、既定のコンテナー イメージが使用されます。 詳しくは、「[既定の開発コンテナー構成の使用](#using-the-default-dev-container-configuration)」をご覧ください。
|
||||
**Note**: As an alternative to using a Dockerfile you can use the `image` property in the `devcontainer.json` file to refer directly to an existing image you want to use. If neither a Dockerfile nor an image is found then the default container image is used. For more information, see "[Using the default dev container configuration](#using-the-default-dev-container-configuration)."
|
||||
|
||||
{% endnote %}
|
||||
|
||||
#### <a name="simple-dockerfile-example"></a>シンプルな Dockerfile の例
|
||||
#### Simple Dockerfile example
|
||||
|
||||
次の例では、4 つの命令を使用します。
|
||||
The following example uses four instructions:
|
||||
|
||||
`ARG` は、ビルド時の変数を定義します。
|
||||
`ARG` defines a build-time variable.
|
||||
|
||||
`FROM` は、生成される Docker イメージの基になる親イメージを指定します。
|
||||
`FROM` specifies the parent image on which the generated Docker image will be based.
|
||||
|
||||
`COPY` は、ファイルをコピーしてファイルシステムに追加します。
|
||||
`COPY` copies a file and adds it to the filesystem.
|
||||
|
||||
`RUN` は、パッケージの一覧を更新して、スクリプトを実行します。 コメント アウトされた命令で示されているように、`RUN` 命令を使用してソフトウェアをインストールすることもできます。 複数のコマンドを実行するには、`&&` を使用して、コマンドを 1 つの `RUN` ステートメントに結合します。
|
||||
`RUN` updates package lists and runs a script. You can also use a `RUN` instruction to install software, as shown by the commented out instructions. To run multiple commands, use `&&` to combine the commands into a single `RUN` statement.
|
||||
|
||||
```Dockerfile{:copy}
|
||||
ARG VARIANT="16-buster"
|
||||
@@ -101,11 +96,11 @@ COPY library-scripts/github-debian.sh /tmp/library-scripts/
|
||||
RUN apt-get update && bash /tmp/library-scripts/github-debian.sh
|
||||
```
|
||||
|
||||
Dockerfile の命令について詳しくは、Docker のドキュメントの「[Dockerfile リファレンス](https://docs.docker.com/engine/reference/builder)」をご覧ください。
|
||||
For more information about Dockerfile instructions, see "[Dockerfile reference](https://docs.docker.com/engine/reference/builder)" in the Docker documentation.
|
||||
|
||||
#### <a name="using-a-dockerfile"></a>Dockerfile の使用
|
||||
#### Using a Dockerfile
|
||||
|
||||
開発コンテナー構成の一部として Dockerfile を使用するには、`devcontainer.json` ファイル内で `dockerfile` プロパティを使用して参照します。
|
||||
To use a Dockerfile as part of a dev container configuration, reference it in your `devcontainer.json` file by using the `dockerfile` property.
|
||||
|
||||
```json{:copy}
|
||||
{
|
||||
@@ -115,120 +110,120 @@ Dockerfile の命令について詳しくは、Docker のドキュメントの
|
||||
}
|
||||
```
|
||||
|
||||
開発コンテナー構成での Dockerfile の使用について詳しくは、{% data variables.product.prodname_vscode_shortname %} のドキュメントの「[開発コンテナーを作成する](https://code.visualstudio.com/docs/remote/create-dev-container#_dockerfile)」をご覧ください。
|
||||
For more information about using a Dockerfile in a dev container configuration, see the {% data variables.product.prodname_vscode_shortname %} documentation "[Create a development container](https://code.visualstudio.com/docs/remote/create-dev-container#_dockerfile)."
|
||||
|
||||
## <a name="using-the-default-dev-container-configuration"></a>既定の開発コンテナー構成の使用
|
||||
## Using the default dev container configuration
|
||||
|
||||
リポジトリで構成を定義しない場合は、{% data variables.product.prodname_dotcom %} が既定の Linux イメージを使用して codespace を作成します。 この Linux イメージには、Python、Node、PHP、Java、Go、C++、Ruby、.NET Core/C# などの一般的な言語のランタイム バージョンが多数含まれています。 これらの言語の最新または LTS リリースが使用されます。 JupyterLab や Conda など、データ サイエンスと機械学習をサポートするツールもあります。 イメージには、Git、GitHub CLI、yarn、openssh、vim などの他の開発者ツールやユーティリティも含まれています。 含まれているすべての言語、ランタイム、ツールを確認するには、codespace ターミナル内で `devcontainer-info content-url` コマンドを使用し、コマンドで出力された URL にアクセスしてください。
|
||||
If you don't define a configuration in your repository, {% data variables.product.prodname_dotcom %} creates a codespace using a default Linux image. This Linux image includes a number of runtime versions for popular languages like Python, Node, PHP, Java, Go, C++, Ruby, and .NET Core/C#. The latest or LTS releases of these languages are used. There are also tools to support data science and machine learning, such as JupyterLab and Conda. The image also includes other developer tools and utilities like Git, GitHub CLI, yarn, openssh, and vim. To see all the languages, runtimes, and tools that are included use the `devcontainer-info content-url` command inside your codespace terminal and follow the URL that the command outputs.
|
||||
|
||||
または、既定の Linux イメージに含まれているすべてのものについて詳しくは、[`microsoft/vscode-dev-containers`](https://github.com/microsoft/vscode-dev-containers/tree/main/containers/codespaces-linux) リポジトリの最新のファイルをご覧ください。
|
||||
Alternatively, for more information about everything that's included in the default Linux image, see the latest file in the [`microsoft/vscode-dev-containers`](https://github.com/microsoft/vscode-dev-containers/tree/main/containers/codespaces-linux) repository.
|
||||
|
||||
{% data variables.product.prodname_github_codespaces %} が提供する言語とツールを使用する小さなプロジェクトで作業している場合は、既定の構成が適しています。
|
||||
The default configuration is a good option if you're working on a small project that uses the languages and tools that {% data variables.product.prodname_github_codespaces %} provides.
|
||||
|
||||
## <a name="using-a-predefined-dev-container-configuration"></a>事前定義済みの開発コンテナー構成の使用
|
||||
## Using a predefined dev container configuration
|
||||
|
||||
事前定義済みの構成の一覧から選択して、リポジトリの開発コンテナー構成を作成できます。 これらの構成は、特定のプロジェクト タイプの共通セットアップを提供します。また、適切なコンテナー オプション、{% data variables.product.prodname_vscode_shortname %} 設定、インストールする必要がある {% data variables.product.prodname_vscode_shortname %} 拡張機能が構成で既に用意されているので、短時間で使い始めることができます。
|
||||
You can choose from a list of predefined configurations to create a dev container configuration for your repository. These configurations provide common setups for particular project types, and can help you quickly get started with a configuration that already has the appropriate container options, {% data variables.product.prodname_vscode_shortname %} settings, and {% data variables.product.prodname_vscode_shortname %} extensions that should be installed.
|
||||
|
||||
追加の拡張性が必要な場合は、事前定義済みの設定を使用することをお勧めします。 事前定義済みの構成から始めて、プロジェクトに合わせて修正することもできます。
|
||||
Using a predefined configuration is a great idea if you need some additional extensibility. You can also start with a predefined configuration and amend it as needed for your project.
|
||||
|
||||
事前定義済みの開発コンテナー構成は、codespace での作業中、またはローカルでのリポジトリの作業中に追加できます。
|
||||
You can add a predefined dev container configuration either while working in a codespace, or while working on a repository locally. To do this in {% data variables.product.prodname_vscode_shortname %} while you are working locally, and not connected to a codespace, you must have the "Remote - Containers" extension installed and enabled. For more information about this extension, see the [{% data variables.product.prodname_vs_marketplace_shortname %}](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers). The following procedure describes the process when you are using a codespace. The steps in {% data variables.product.prodname_vscode_shortname %} when you are not connected to a codespace are very similar.
|
||||
|
||||
{% data reusables.codespaces.command-palette-container %}
|
||||
1. 使用する定義をクリックします。
|
||||
1. Click the definition you want to use.
|
||||
|
||||

|
||||

|
||||
|
||||
1. プロンプトに従って定義をカスタマイズします。 定義をカスタマイズするためのオプションの詳細については、「[`devcontainer.json` ファイルへの追加機能の追加](#adding-additional-features-to-your-devcontainerjson-file)」を参照してください。
|
||||
1. **[OK]** をクリックします。
|
||||
1. Follow the prompts to customize your definition. For more information on the options to customize your definition, see "[Adding additional features to your `devcontainer.json` file](#adding-additional-features-to-your-devcontainerjson-file)."
|
||||
1. Click **OK**.
|
||||
|
||||
![[OK] ボタン](/assets/images/help/codespaces/prebuilt-container-ok-button.png)
|
||||

|
||||
|
||||
1. codespace で作業している場合は、ウィンドウの右下にあるメッセージで **[今すぐリビルド]** をクリックして変更を適用します。 コンテナーのリビルドの詳細については、「[構成への変更の適用](#applying-configuration-changes-to-a-codespace)」を参照してください。
|
||||
1. If you are working in a codespace, apply your changes, by clicking **Rebuild now** in the message at the bottom right of the window. For more information about rebuilding your container, see "[Applying changes to your configuration](#applying-configuration-changes-to-a-codespace)."
|
||||
|
||||
![{% data variables.product.prodname_vscode_command_palette %} の [Codespaces: コンテナーのリビルド]](/assets/images/help/codespaces/rebuild-prompt.png)
|
||||

|
||||
|
||||
### <a name="adding-additional-features-to-your-devcontainerjson-file"></a>`devcontainer.json` ファイルへの追加機能の追加
|
||||
### Adding additional features to your `devcontainer.json` file
|
||||
|
||||
{% note %}
|
||||
|
||||
**注:** この機能はベータ版であり、変更される可能性があります。
|
||||
**Note:** This feature is in beta and subject to change.
|
||||
|
||||
{% endnote %}
|
||||
|
||||
事前定義済みのコンテナー構成に機能を追加すると、カスタム開発コンテナー構成をゼロから作成せずに、使用可能なツールをカスタマイズし、ワークスペースの機能を拡張できます。 たとえば、事前定義済みのコンテナー構成を使用して、{% data variables.product.prodname_cli %} を追加できます。 コンテナー構成を設定するときに `devcontainer.json` ファイルに機能を追加することで、これらの追加機能がプロジェクトで使用できるようになります。
|
||||
You can add features to your predefined container configuration to customize which tools are available and extend the functionality of your workspace without having to create a custom dev container configuration from scratch. For example, you could use a predefined container configuration and add the {% data variables.product.prodname_cli %}. You can make these additional features available for your project by adding the features to your `devcontainer.json` file when you set up your container configuration.
|
||||
|
||||
定義済みのコンテナーを構成するときにそれらを選択することで、最も一般的な機能の一部を追加できます。 使用可能な機能の詳細については、`vscode-dev-containers` リポジトリの[スクリプト ライブラリ](https://github.com/microsoft/vscode-dev-containers/tree/main/script-library#scripts)を参照してください。
|
||||
You can add some of the most common features by selecting them when configuring your predefined container. For more information on the available features, see the [script library](https://github.com/microsoft/vscode-dev-containers/tree/main/script-library#scripts) in the `vscode-dev-containers` repository.
|
||||
|
||||
|
||||
1. コマンド パレット (`Shift + Command + P` / `Ctrl + Shift + P`) にアクセスし、「configure」と入力します。 **[Codespaces: Configure Devcontainer Features]\(Codespaces: Devcontainer 機能の構成\)** を選択します。
|
||||
1. Access the Command Palette (<kbd>Shift</kbd>+<kbd>Command</kbd>+<kbd>P</kbd> (Mac) / <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>P</kbd> (Windows/Linux)), then start typing "configure". Select **Codespaces: Configure Devcontainer Features**.
|
||||
|
||||
![コマンド パレットの [Codespaces: Configure Devcontainer Features]\(Codespaces: Devcontainer 機能の構成\) コマンド](/assets/images/help/codespaces/codespaces-configure-features.png)
|
||||

|
||||
|
||||
1. 機能の選択を更新し、 **[OK]** をクリックします。
|
||||
1. Update your feature selections, then click **OK**.
|
||||
|
||||

|
||||

|
||||
|
||||
1. 変更を適用するには、画面の右下隅にある **[Rebuild now]\(今すぐリビルド\)** をクリックします。 コンテナーのリビルドの詳細については、「[構成への変更の適用](#applying-configuration-changes-to-a-codespace)」を参照してください。
|
||||
1. To apply the changes, in the bottom right corner of the screen, click **Rebuild now**. For more information about rebuilding your container, see "[Applying changes to your configuration](#applying-configuration-changes-to-a-codespace)."
|
||||
|
||||
![コマンド パレットの [Codespaces: コンテナーのリビルド]](/assets/images/help/codespaces/rebuild-prompt.png)
|
||||

|
||||
|
||||
## <a name="creating-a-custom-dev-container-configuration"></a>カスタム開発コンテナー構成の作成
|
||||
## Creating a custom dev container configuration
|
||||
|
||||
事前定義済みの構成がどれもニーズを満たさない場合は、独自の `devcontainer.json` ファイルを記述してカスタム構成を作成できます。
|
||||
If none of the predefined configurations meets your needs, you can create a custom configuration by writing your own `devcontainer.json` file.
|
||||
|
||||
* リポジトリから codespace を作成するすべてのユーザーが使用する単一の `devcontainer.json` ファイルを追加する場合は、リポジトリのルートにある `.devcontainer` ディレクトリ内にファイルを作成します。
|
||||
* ユーザーが構成を選択できるようにする場合は、複数のカスタム `devcontainer.json` ファイルを作成して、それぞれを `.devcontainer` ディレクトリの個別のサブディレクトリ内に配置できます。
|
||||
* If you're adding a single `devcontainer.json` file that will be used by everyone who creates a codespace from your repository, create the file within a `.devcontainer` directory at the root of the repository.
|
||||
* If you want to offer users a choice of configuration, you can create multiple custom `devcontainer.json` files, each located within a separate subdirectory of the `.devcontainer` directory.
|
||||
|
||||
{% note %}
|
||||
|
||||
**注**: `devcontainer.json` ファイルは、`.devcontainer` より 2 レベル以上下位のディレクトリに配置することはできません。 たとえば、`.devcontainer/teamA/devcontainer.json` にあるファイルは機能しますが、`.devcontainer/teamA/testing/devcontainer.json` の場合は機能しません。
|
||||
**Note**: You can't locate your `devcontainer.json` files in directories more than one level below `.devcontainer`. For example, a file at `.devcontainer/teamA/devcontainer.json` will work, but `.devcontainer/teamA/testing/devcontainer.json` will not.
|
||||
|
||||
{% endnote %}
|
||||
|
||||
リポジトリで複数の `devcontainer.json` ファイルが見つかった場合は、それらが codespace の作成オプション ページに一覧表示されます。 詳細については、「[codespace を作成する](/codespaces/developing-in-codespaces/creating-a-codespace#creating-a-codespace)」を参照してください。
|
||||
If multiple `devcontainer.json` files are found in the repository, they are listed in the codespace creation options page. For more information, see "[Creating a codespace](/codespaces/developing-in-codespaces/creating-a-codespace#creating-a-codespace)."
|
||||
|
||||

|
||||

|
||||
|
||||
### <a name="default-configuration-selection-during-codespace-creation"></a>codespace の作成時における既定の構成の選択
|
||||
### Default configuration selection during codespace creation
|
||||
|
||||
`.devcontainer/devcontainer.json` または `.devcontainer.json` が存在する場合は、codespace を作成するときに使用可能な構成ファイルの一覧でそれが既定の選択になります。 どちらのファイルも存在しない場合は、既定の開発コンテナー構成が既定で選択されます。
|
||||
If `.devcontainer/devcontainer.json` or `.devcontainer.json` exists, it will be the default selection in the list of available configuration files when you create a codespace. If neither file exists, the default dev container configuration will be selected by default.
|
||||
|
||||

|
||||

|
||||
|
||||
### <a name="editing-the-devcontainerjson-file"></a>devcontainer.json ファイルの編集
|
||||
### Editing the devcontainer.json file
|
||||
|
||||
`devcontainer.json` ファイルでサポートされている構成キーを追加および編集して、codespace の環境の要素を指定できます (たとえば、どの {% data variables.product.prodname_vscode_shortname %} 拡張機能をインストールするか)。 {% data reusables.codespaces.more-info-devcontainer %}
|
||||
You can add and edit the supported configuration keys in the `devcontainer.json` file to specify aspects of the codespace's environment, like which {% data variables.product.prodname_vscode_shortname %} extensions will be installed. {% data reusables.codespaces.more-info-devcontainer %}
|
||||
|
||||
`devcontainer.json` ファイルは JSONC 形式を使用して記述されます。 これにより、構成ファイル内にコメントを含めることができます。 詳しくは、{% data variables.product.prodname_vscode_shortname %} のドキュメントの「[{% data variables.product.prodname_vscode_shortname %} での JSON の編集](https://code.visualstudio.com/docs/languages/json#_json-with-comments)」をご覧ください。
|
||||
The `devcontainer.json` file is written using the JSONC format. This allows you to include comments within the configuration file. For more information, see "[Editing JSON with {% data variables.product.prodname_vscode_shortname %}](https://code.visualstudio.com/docs/languages/json#_json-with-comments)" in the {% data variables.product.prodname_vscode_shortname %} documentation.
|
||||
|
||||
{% note %}
|
||||
|
||||
**注**: リンターを使用して `devcontainer.json` ファイルを検証する場合は、JSON ではなく JSONC に設定されていることを確認してください。正しく設定されていないと、コメントがエラーとして報告されます。
|
||||
**Note**: If you use a linter to validate the `devcontainer.json` file, make sure it is set to JSONC and not JSON or comments will be reported as errors.
|
||||
|
||||
{% endnote %}
|
||||
|
||||
### <a name="editor-settings-for--data-variablesproductprodname_vscode_shortname-"></a>{% data variables.product.prodname_vscode_shortname %} のエディター設定
|
||||
### Editor settings for {% data variables.product.prodname_vscode_shortname %}
|
||||
|
||||
{% data reusables.codespaces.vscode-settings-order %}
|
||||
|
||||
{% data variables.product.prodname_vscode_shortname %} の既定のエディター設定は、2 か所で定義できます。
|
||||
You can define default editor settings for {% data variables.product.prodname_vscode_shortname %} in two places.
|
||||
|
||||
* リポジトリの `.vscode/settings.json` ファイルで定義されたエディター設定は、codespace で _Workspace_ スコープの設定として適用されます。
|
||||
* `devcontainer.json` ファイルの `settings` キーで定義されたエディター設定は、codespace で _Remote [Codespaces]_ スコープの設定として適用されます。
|
||||
* Editor settings defined in the `.vscode/settings.json` file in your repository are applied as _Workspace_-scoped settings in the codespace.
|
||||
* Editor settings defined in the `settings` key in the `devcontainer.json` file are applied as _Remote [Codespaces]_-scoped settings in the codespace.
|
||||
|
||||
## <a name="applying-configuration-changes-to-a-codespace"></a>codespace への構成変更の適用
|
||||
## Applying configuration changes to a codespace
|
||||
|
||||
{% data reusables.codespaces.apply-devcontainer-changes %}
|
||||
|
||||
{% data reusables.codespaces.rebuild-command %}
|
||||
1. {% data reusables.codespaces.recovery-mode %} 構成のエラーを修正します。
|
||||
1. {% data reusables.codespaces.recovery-mode %} Fix the errors in the configuration.
|
||||
|
||||

|
||||

|
||||
|
||||
- 作成ログを確認してエラーを診断するには、 **[View creation log]\(作成ログの表示\)** をクリックします。
|
||||
- ログで識別されたエラーを修正するには、`devcontainer.json` ファイルを更新します。
|
||||
- 変更を適用するには、コンテナーをリビルドします。
|
||||
- To diagnose the error by reviewing the creation logs, click **View creation log**.
|
||||
- To fix the errors identified in the logs, update your `devcontainer.json` file.
|
||||
- To apply the changes, rebuild your container.
|
||||
|
||||
## <a name="further-reading"></a>参考資料
|
||||
## Further reading
|
||||
|
||||
- 「[codespaces の事前ビルド](/codespaces/prebuilding-your-codespaces)」
|
||||
- "[Prebuilding your codespaces](/codespaces/prebuilding-your-codespaces)"
|
||||
|
||||
@@ -12,11 +12,11 @@ topics:
|
||||
- Set up
|
||||
product: '{% data reusables.gated-features.codespaces %}'
|
||||
ms.openlocfilehash: 368b7c73d13bb0624c9d838ac2d7bb18a2b050e3
|
||||
ms.sourcegitcommit: fcf3546b7cc208155fb8acdf68b81be28afc3d2d
|
||||
ms.sourcegitcommit: fb047f9450b41b24afc43d9512a5db2a2b750a2a
|
||||
ms.translationtype: HT
|
||||
ms.contentlocale: ja-JP
|
||||
ms.lasthandoff: 09/10/2022
|
||||
ms.locfileid: '147880735'
|
||||
ms.locfileid: '147880807'
|
||||
---
|
||||
## 概要
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
title: ブランチへの変更のエクスポート
|
||||
intro: この記事では、codespace の変更をブランチにエクスポートする手順について説明します。
|
||||
title: Exporting changes to a branch
|
||||
intro: This article provides steps for exporting your codespace changes to a branch.
|
||||
product: '{% data reusables.gated-features.codespaces %}'
|
||||
versions:
|
||||
fpt: '*'
|
||||
@@ -9,25 +9,20 @@ type: reference
|
||||
topics:
|
||||
- Codespaces
|
||||
shortTitle: Exporting changes
|
||||
ms.openlocfilehash: 676a94ae33b7dba4990014d472cbf28992437a2c
|
||||
ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5
|
||||
ms.translationtype: HT
|
||||
ms.contentlocale: ja-JP
|
||||
ms.lasthandoff: 09/05/2022
|
||||
ms.locfileid: '147111003'
|
||||
---
|
||||
## ブランチへの変更のエクスポート
|
||||
|
||||
{% data variables.product.prodname_github_codespaces %} を使用しているときに、codespace を起動せずにブランチに変更をエクスポートする場合があります。
|
||||
## Exporting changes to a branch
|
||||
|
||||
これは、[使用制限](/billing/managing-billing-for-github-codespaces/managing-spending-limits-for-codespaces)に達した場合や、codespace へのアクセスで一般的な問題が発生している場合に便利です。
|
||||
While using {% data variables.product.prodname_github_codespaces %}, you may want to export your changes to a branch without launching your codespace.
|
||||
|
||||
変更をエクスポートするには、次の操作を行います。
|
||||
This can be useful when you have hit a [spending limit](/billing/managing-billing-for-github-codespaces/managing-spending-limits-for-codespaces) or have a general issue accessing your codespace.
|
||||
|
||||
1. [github.com/codespaces](https://github.com/codespaces) の "Your Codespaces" に移動するか、個々のリポジトリの場合は、 **[{% octicon "code" aria-label="The code icon" %} コード]** メニューをクリックします。
|
||||
2. エクスポートする元の codespace の右側にある省略記号 ( **...** ) をクリックします。
|
||||
3. **[{% octicon "git-branch" aria-label="The git branch icon" %} ブランチへの変更のエクスポート]** を選択します。
|
||||
To export your changes:
|
||||
|
||||

|
||||
{% data reusables.codespaces.your-codespaces-procedure-step %} Or, for an individual repository, click the **{% octicon "code" aria-label="The code icon" %} Code** menu.
|
||||
1. Click the ellipsis (**...**) to the right of the codespace you want to export from.
|
||||
1. Select **{% octicon "git-branch" aria-label="The git branch icon" %} Export changes to branch**.
|
||||
|
||||
4. ポップオーバーから、 **[ブランチの作成]** を選択します。
|
||||

|
||||
|
||||
1. From the popover, select **Create branch**.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
title: GitHub Codespaces logs
|
||||
intro: 'Overview of the logging locations used by {% data variables.product.prodname_github_codespaces %}.'
|
||||
title: GitHub Codespaces ログ
|
||||
intro: '{% data variables.product.prodname_github_codespaces %} で使用されるログの場所の概要。'
|
||||
product: '{% data reusables.gated-features.codespaces %}'
|
||||
versions:
|
||||
fpt: '*'
|
||||
@@ -12,60 +12,64 @@ topics:
|
||||
shortTitle: Codespaces logs
|
||||
redirect_from:
|
||||
- /codespaces/troubleshooting/codespaces-logs
|
||||
ms.openlocfilehash: d7dd24dc7f6d87c816feff33b4ca1fe969d6c258
|
||||
ms.sourcegitcommit: 478f2931167988096ae6478a257f492ecaa11794
|
||||
ms.translationtype: HT
|
||||
ms.contentlocale: ja-JP
|
||||
ms.lasthandoff: 09/09/2022
|
||||
ms.locfileid: '147760911'
|
||||
---
|
||||
Information on {% data variables.product.prodname_github_codespaces %} に関する情報は、次の 3 つの異なるログに出力されます。
|
||||
|
||||
- Codespace ログ
|
||||
- 作成ログ
|
||||
- 拡張ログ ({% data variables.product.prodname_vscode %} デスクトップ) またはブラウザー コンソール ログ (Web の {% data variables.product.prodname_vscode %})
|
||||
|
||||
Information on {% data variables.product.prodname_github_codespaces %} is output to three different logs:
|
||||
## Codespace ログ
|
||||
|
||||
- Codespace logs
|
||||
- Creation logs
|
||||
- Extension logs ({% data variables.product.prodname_vscode %} desktop) or Browser console logs ({% data variables.product.prodname_vscode %} in the web)
|
||||
|
||||
## Codespace logs
|
||||
|
||||
These logs contain detailed information about the codespace, the container, the session, and the {% data variables.product.prodname_vscode %} environment. They are useful for diagnosing connection issues and other unexpected behavior. For example, the codespace freezes but the "Reload Windows" option unfreezes it for a few minutes, or you are randomly disconnected from the codespace but able to reconnect immediately.
|
||||
これらのログには、codespace、コンテナー、セッション、および {% data variables.product.prodname_vscode %} 環境に関する詳細情報が含まれています。 接続の問題やその他の予期しない動作の診断に役立ちます。 たとえば、codespace がフリーズしても、[Windowsの再読み込み] オプションを使用すると、それを数分間凍結解除することができます。つまり、codespace からランダムに切断されても、すぐに再接続することができます。
|
||||
|
||||
{% webui %}
|
||||
|
||||
1. If you are using {% data variables.product.prodname_codespaces %} in the browser, ensure that you are connected to the codespace you want to debug.
|
||||
1. Open the {% data variables.product.prodname_vscode_command_palette_shortname %} (<kbd>Shift</kbd>+<kbd>Command</kbd>+<kbd>P</kbd> (Mac) / <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>P</kbd> (Windows/Linux)) and type **Export logs**. Select **Codespaces: Export Logs** from the list to download the logs.
|
||||
1. Define where to save the zip archive of logs then click **Save** (desktop) or click **OK** (web).
|
||||
1. If you are using {% data variables.product.prodname_codespaces %} in the browser, right-click on the zip archive of logs from the Explorer view and select **Download…** to download them to your local machine.
|
||||
1. ブラウザーで {% data variables.product.prodname_codespaces %} を使用している場合は、デバッグするコード空間に接続されることを確認してください。
|
||||
1. {% data variables.product.prodname_vscode_command_palette_shortname %} を開き (<kbd>Shift</kbd> + <kbd>Command</kbd> + <kbd>P</kbd> (Mac) / <kbd>Ctrl</kbd> + <kbd>Shift</kbd> + <kbd>P</kbd> (Windows/Linux))、「**開発コンテナー**」と入力します。 **[Codespaces: ログのエクスポート]** を一覧から選択して、該当するログをダウンロードします。
|
||||
1. ログの zip アーカイブを保存する場所を定義し、 **[保存]** (デスクトップ) をクリックするか、 **[OK]** (Web) をクリックします。
|
||||
1. ブラウザーで {% data variables.product.prodname_codespaces %} を使用している場合は、エクスプローラー ビューからログの zip アーカイブを右クリックし、 **[ダウンロード]** を選択して、 それらを、ご利用のローカル コンピューターにダウンロードします。
|
||||
|
||||
{% endwebui %}
|
||||
|
||||
{% vscode %}
|
||||
|
||||
1. Open the {% data variables.product.prodname_vscode_command_palette_shortname %} (<kbd>Shift</kbd>+<kbd>Command</kbd>+<kbd>P</kbd> (Mac) / <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>P</kbd> (Windows/Linux)) and type **Export logs**. Select **Codespaces: Export Logs** from the list to download the logs.
|
||||
1. Define where to save the zip archive of logs then click **Save** (desktop) or click **OK** (web).
|
||||
1. {% data variables.product.prodname_vscode_command_palette_shortname %} を開き (<kbd>Shift</kbd> + <kbd>Command</kbd> + <kbd>P</kbd> (Mac) / <kbd>Ctrl</kbd> + <kbd>Shift</kbd> + <kbd>P</kbd> (Windows/Linux))、「**開発コンテナー**」と入力します。 **[Codespaces: ログのエクスポート]** を一覧から選択して、該当するログをダウンロードします。
|
||||
1. ログの zip アーカイブを保存する場所を定義し、 **[保存]** (デスクトップ) をクリックするか、 **[OK]** (Web) をクリックします。
|
||||
|
||||
{% endvscode %}
|
||||
|
||||
{% cli %}
|
||||
|
||||
Currently you can't use {% data variables.product.prodname_cli %} to access these logs. To access them, open your codespace in {% data variables.product.prodname_vscode %} or in a browser.
|
||||
現在、{% data variables.product.prodname_cli %} を使用してこれらのログにアクセスすることはできません。 それらにアクセスするには、{% data variables.product.prodname_vscode %} またはブラウザーでご利用の codespace を開きます。
|
||||
|
||||
{% endcli %}
|
||||
|
||||
## Creation logs
|
||||
## 作成ログ
|
||||
|
||||
These logs contain information about the container, dev container, and their configuration. They are useful for debugging configuration and setup problems.
|
||||
これらのログには、コンテナー、開発コンテナー、およびその構成に関する情報が含まれています。 これらは、構成とセットアップの問題のデバッグに役立ちます。
|
||||
|
||||
|
||||
{% webui %}
|
||||
|
||||
1. Connect to the codespace you want to debug.
|
||||
2. Open the {% data variables.product.prodname_vscode_command_palette_shortname %} (<kbd>Shift</kbd>+<kbd>Command</kbd>+<kbd>P</kbd> (Mac) / <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>P</kbd> (Windows/Linux)) and type **Creation logs**. Select **Codespaces: View Creation Log** from the list to open the `creation.log` file.
|
||||
1. デバッグする codespace に接続します。
|
||||
2. {% data variables.product.prodname_vscode_command_palette_shortname %} を開き (<kbd>Shift</kbd> + <kbd>Command</kbd> + <kbd>P</kbd> (Mac) / <kbd>Ctrl</kbd> + <kbd>Shift</kbd> + <kbd>P</kbd> (Windows/Linux))、「**作成ログ**」と入力します。 一覧から **[Codespaces: 作成ログの表示]** を選択して、`creation.log` ファイルを開きます。
|
||||
|
||||
If you want to share the log with support, you can copy the text from the creation log into a text editor and save the file locally.
|
||||
サポートとログを共有する場合は、作成ログのテキストをテキスト エディターにコピーし、ファイルをローカルに保存できます。
|
||||
|
||||
{% endwebui %}
|
||||
|
||||
{% vscode %}
|
||||
|
||||
Open the {% data variables.product.prodname_vscode_command_palette_shortname %} (<kbd>Shift</kbd>+<kbd>Command</kbd>+<kbd>P</kbd> (Mac) / <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>P</kbd> (Windows/Linux)) and type **Creation logs**. Select **Codespaces: View Creation Log** from the list to open the `creation.log` file.
|
||||
{% data variables.product.prodname_vscode_command_palette_shortname %} を開き (<kbd>Shift</kbd> + <kbd>Command</kbd> + <kbd>P</kbd> (Mac) / <kbd>Ctrl</kbd> + <kbd>Shift</kbd> + <kbd>P</kbd> (Windows/Linux))、「**作成ログ**」と入力します。 一覧から **[Codespaces: 作成ログの表示]** を選択して、`creation.log` ファイルを開きます。
|
||||
|
||||
If you want to share the log with support, you can copy the text from the creation log into a text editor and save the file locally.
|
||||
サポートとログを共有する場合は、作成ログのテキストをテキスト エディターにコピーし、ファイルをローカルに保存できます。
|
||||
|
||||
{% endvscode %}
|
||||
|
||||
@@ -73,15 +77,15 @@ If you want to share the log with support, you can copy the text from the creati
|
||||
|
||||
{% data reusables.cli.cli-learn-more %}
|
||||
|
||||
To see the creation log use the `gh codespace logs` subcommand. After entering the command choose from the list of codespaces that's displayed.
|
||||
作成ログを表示するには、`gh codespace logs` サブコマンドを使用します。 コマンドを入力した後、表示される codespace の一覧から選択します。
|
||||
|
||||
```shell
|
||||
gh codespace logs
|
||||
```
|
||||
|
||||
For more information about this command, see [the {% data variables.product.prodname_cli %} manual](https://cli.github.com/manual/gh_codespace_logs).
|
||||
このコマンドの詳細については、[{% data variables.product.prodname_cli %} に関するマニュアル](https://cli.github.com/manual/gh_codespace_logs)を参照してください。
|
||||
|
||||
If you want to share the log with support, you can save the output to a file:
|
||||
ログをサポートと共有したい場合は、出力をファイルに保存できます。
|
||||
|
||||
```shell
|
||||
gh codespace logs -c <CODESPACE-NAME> > /path/to/logs.txt
|
||||
@@ -89,20 +93,20 @@ gh codespace logs -c <CODESPACE-NAME> > /path/to/logs.txt
|
||||
|
||||
{% endcli %}
|
||||
|
||||
## Extension logs
|
||||
## 拡張機能ログ
|
||||
|
||||
These logs are available for {% data variables.product.prodname_vscode %} desktop users only. They are useful if it seems like the {% data variables.product.prodname_codespaces %} extension or {% data variables.product.prodname_vscode %} editor are having issues that prevent creation or connection.
|
||||
これらのログは、{% data variables.product.prodname_vscode %} デスクトップ ユーザーにのみ使用できます。 それらは、{% data variables.product.prodname_codespaces %} 拡張子または {% data variables.product.prodname_vscode %} エディターに作成または接続を妨げる問題があるように思われる場合に役立ちます。
|
||||
|
||||
1. In {% data variables.product.prodname_vscode %}, open the Command Palette.
|
||||
1. Type **Logs** and select **Developer: Open Extension Logs Folder** from the list to open the extension log folder in your system's file explorer.
|
||||
1. {% data variables.product.prodname_vscode %} で、コマンド パレットを開きます。
|
||||
1. 「**ログ**」と入力し、一覧から **[開発者: 拡張機能ログ フォルダーを開く]** を選択して、ご利用のシステムのファイル エクスプローラーで拡張機能ログ フォルダーを開きます。
|
||||
|
||||
From this view, you can access logs generated by the various extensions that you use in {% data variables.product.prodname_vscode %}. You will see logs for GitHub Codespaces, GitHub Authentication, and Git, in addition to any other extensions you have enabled.
|
||||
このビューからは、{% data variables.product.prodname_vscode %} で使用しているさまざまな拡張機能によって生成されたログにアクセスできます。 有効にした他の拡張機能に加えて、GitHub Codespaces、GitHub Authentication、および Git のログが表示されます。
|
||||
|
||||
## Browser console logs
|
||||
## ブラウザー コンソールのログ
|
||||
|
||||
These logs are useful only if you want to debug problems with using {% data variables.product.prodname_codespaces %} in the browser. They are useful for debugging problems creating and connecting to {% data variables.product.prodname_codespaces %}.
|
||||
これらのログは、ブラウザーで {% data variables.product.prodname_codespaces %} を使用する際の問題をデバッグする場合にのみ役立ちます。 これらは、{% data variables.product.prodname_codespaces %} の作成と接続に関する問題のデバッグに役立ちます。
|
||||
|
||||
1. In the browser window for the codespace you want to debug, open the developer tools window.
|
||||
1. Display the "Console" tab and click **errors** in the left side bar to show only the errors.
|
||||
1. In the log area on the right, right-click and select **Save as** to save a copy of the errors to your local machine.
|
||||

|
||||
1. デバッグする codespace のブラウザー ウィンドウで、開発者ツール ウィンドウを開きます。
|
||||
1. [コンソール] タブを表示し、左側のバーで **[エラー]** をクリックすると、エラーのみが表示されます。
|
||||
1. 右側のログ領域で右クリックし、 **[名前を付けて保存]** を選択して、エラーのコピーをローカル コンピューターに保存します。
|
||||

|
||||
|
||||
@@ -9,21 +9,23 @@ type: reference
|
||||
topics:
|
||||
- Codespaces
|
||||
shortTitle: Creation and deletion
|
||||
ms.openlocfilehash: 0a93ef45affe3f19e3e679d909db432ddd6b3e97
|
||||
ms.sourcegitcommit: 3a16368cd8beb8b8487eb77d3e597cf49f4c4335
|
||||
ms.openlocfilehash: e71b0651271ec263c1e0b410a049b9cb6a3921ca
|
||||
ms.sourcegitcommit: 478f2931167988096ae6478a257f492ecaa11794
|
||||
ms.translationtype: HT
|
||||
ms.contentlocale: ja-JP
|
||||
ms.lasthandoff: 07/14/2022
|
||||
ms.locfileid: '147110835'
|
||||
ms.lasthandoff: 09/09/2022
|
||||
ms.locfileid: '147718110'
|
||||
---
|
||||
## <a name="creating-codespaces"></a>codespace を作成する
|
||||
## codespace を作成する
|
||||
|
||||
### <a name="no-access-to-create-a-codespace"></a>codespace を作成するアクセス権がない
|
||||
### codespace を作成するアクセス権がない
|
||||
{% data variables.product.prodname_codespaces %} はすべてのリポジトリで利用できるわけではありません。 [Open with Codespaces]\(codespace で開く\) ボタンが表示されない場合は、そのリポジトリで {% data variables.product.prodname_github_codespaces %} を使用できない可能性があります。 詳細については、「[codespace を作成する](/codespaces/developing-in-codespaces/creating-a-codespace#access-to-codespaces)」を参照してください。
|
||||
|
||||
ご自分がリポジトリへの書き込みアクセス権を持っているか、Organization によってそれに対するフォークが有効にされていない限り、その Organization が所有するプライベート リポジトリ用の codespace を作成することはできません。
|
||||
|
||||
Organization で [{% data variables.product.prodname_codespaces %} を有効](/codespaces/managing-codespaces-for-your-organization/enabling-codespaces-for-your-organization#about-enabling-codespaces-for-your-organization)にしていることが確実な場合は、Organization の所有者または支払いマネージャーが {% data variables.product.prodname_codespaces %} の使用制限を設定していないか確認してください。 詳しい情報については、「[{% data variables.product.prodname_codespaces %} の利用上限の管理](/billing/managing-billing-for-github-codespaces/managing-spending-limits-for-codespaces)」を参照してください。
|
||||
|
||||
### <a name="codespace-does-not-open-when-created"></a>作成時に codespace が開かない
|
||||
### 作成時に codespace が開かない
|
||||
|
||||
codespace を作成しても開かない場合:
|
||||
|
||||
@@ -33,13 +35,13 @@ codespace を作成しても開かない場合:
|
||||
|
||||
{% data variables.product.prodname_codespaces %} が使用可能なリポジトリの codespace をまだ作成できない場合は、{% data reusables.codespaces.contact-support %}
|
||||
|
||||
## <a name="deleting-codespaces"></a>codespace を削除する
|
||||
## codespace を削除する
|
||||
|
||||
codespace の所有者は、その codespace を完全に制御でき、自身の codespace だけを削除できます。 別のユーザーによって作成された codespace を削除できません。
|
||||
|
||||
ブラウザー、{% data variables.product.prodname_vscode %}、または {% data variables.product.prodname_cli %} を使用して codespace を削除できます。 {% data variables.product.prodname_cli %} では、codespace を一括削除することもできます。 詳細については、「[codespace の削除](/codespaces/developing-in-codespaces/deleting-a-codespace)」を参照してください。
|
||||
|
||||
## <a name="container-storage"></a>コンテナー ストレージ
|
||||
## コンテナー ストレージ
|
||||
|
||||
codespace を作成すると、ストレージ容量に限りがあるため、時間の経過とともにスペースを解放する必要がある場合があります。 {% data variables.product.prodname_codespaces %} ターミナルで次のコマンドのいずれかを実行してみて、ストレージ容量を解放します。
|
||||
|
||||
@@ -53,7 +55,7 @@ codespace を作成すると、ストレージ容量に限りがあるため、
|
||||
- `docker system prune` を使用して (すべての画像を削除する場合は `-a` を、すべてのボリュームを削除する場合は `--volumes` を付加します)、未使用の Docker イメージ、ネットワーク、コンテナーを削除します。
|
||||
- 追跡されていないファイルを作業ツリーから削除します: `git clean -i`。
|
||||
|
||||
## <a name="configuration"></a>構成
|
||||
## 構成
|
||||
|
||||
{% data reusables.codespaces.recovery-mode %}
|
||||
|
||||
|
||||
@@ -11,21 +11,21 @@ topics:
|
||||
shortTitle: Connection
|
||||
redirect_from:
|
||||
- /codespaces/troubleshooting/troubleshooting-your-connection-to-codespaces
|
||||
ms.openlocfilehash: ef46f2220bda8ddbd2fbb8848fcaad526727f2b2
|
||||
ms.sourcegitcommit: 3a16368cd8beb8b8487eb77d3e597cf49f4c4335
|
||||
ms.openlocfilehash: 827b5add20690490a556f9553c9f8494324e0ef2
|
||||
ms.sourcegitcommit: 478f2931167988096ae6478a257f492ecaa11794
|
||||
ms.translationtype: HT
|
||||
ms.contentlocale: ja-JP
|
||||
ms.lasthandoff: 07/14/2022
|
||||
ms.locfileid: '147111567'
|
||||
ms.lasthandoff: 09/09/2022
|
||||
ms.locfileid: '147760905'
|
||||
---
|
||||
## <a name="503-codespace-service-unavailable"></a>503 codespace サービスを使用できない
|
||||
## 503 codespace サービスを使用できない
|
||||
|
||||
codespace は、30 分間アクティビティがないと停止するように設定されています。 停止した後で codespace を操作しようとすると、`503 service unavailable` エラーが表示されることがあります。
|
||||
|
||||
- **[開始]** ボタンが {% data variables.product.prodname_vscode %} またはブラウザー ウィンドウに表示されている場合は、 **[開始]** をクリックして codespace に再接続します。
|
||||
- ウィンドウを再度読み込んで、codespace をリセットします。 {% data variables.product.prodname_vscode %} の [コマンド パレット](/codespaces/codespaces-reference/using-the-command-palette-in-codespaces#accessing-the-command-palette)で、 **[開発者: ウィンドウの再読み込み]** をクリックします。
|
||||
|
||||
## <a name="browser-cannot-connect"></a>ブラウザーが接続できない
|
||||
## ブラウザーが接続できない
|
||||
|
||||
ブラウザーから codespace にアクセスできないことがあります。 その場合は、 https://github.com/codespaces にアクセスし、そのページから codespace に接続してみてください。
|
||||
|
||||
@@ -36,7 +36,7 @@ codespace は、30 分間アクティビティがないと停止するように
|
||||
|
||||
それでも接続できない場合は、{% data reusables.codespaces.contact-support %}
|
||||
|
||||
## <a name="-data-variablesproductprodname_github_codespaces--extension-for--data-variablesproductprodname_vscode--cannot-connect"></a>{% data variables.product.prodname_vscode %} 用の {% data variables.product.prodname_github_codespaces %} 拡張機能が接続できない
|
||||
## {% data variables.product.prodname_vscode %} 用の {% data variables.product.prodname_github_codespaces %} 拡張機能が接続できない
|
||||
|
||||
{% data variables.product.prodname_vscode %} デスクトップから codespace に接続できない場合は、次のトラブルシューティング手順を使います。
|
||||
|
||||
@@ -49,6 +49,6 @@ codespace は、30 分間アクティビティがないと停止するように
|
||||
|
||||
それでも接続できない場合は、{% data reusables.codespaces.contact-support %}
|
||||
|
||||
### <a name="the-codespace-has-latency-issues"></a>codespace に待ち時間の問題がある
|
||||
### codespace に待ち時間の問題がある
|
||||
|
||||
codespace が特に遅いと思われる場合、または待ち時間の問題がある場合は、遠いリージョンに作成されている可能性があります。 これを解決するには、[{% data variables.product.prodname_codespaces %} のリージョンを手動で設定する](/codespaces/managing-your-codespaces/setting-your-default-region-for-codespaces)ことができます。
|
||||
|
||||
@@ -10,10 +10,10 @@ topics:
|
||||
- Community
|
||||
shortTitle: Management & moderation
|
||||
ms.openlocfilehash: 93e540042965ef7f31b5f270837b5641c29e72dd
|
||||
ms.sourcegitcommit: fcf3546b7cc208155fb8acdf68b81be28afc3d2d
|
||||
ms.sourcegitcommit: 80842b4e4c500daa051eff0ccd7cde91c2d4bb36
|
||||
ms.translationtype: HT
|
||||
ms.contentlocale: ja-JP
|
||||
ms.lasthandoff: 09/11/2022
|
||||
ms.lasthandoff: 09/12/2022
|
||||
ms.locfileid: '147431985'
|
||||
---
|
||||
## コミュニティの管理とモデレーションについて
|
||||
|
||||
@@ -9,10 +9,10 @@ redirect_from:
|
||||
versions:
|
||||
fpt: '*'
|
||||
ms.openlocfilehash: 30604c6b3ed0ab9ca5c0f3f8ca0fe853624ee86b
|
||||
ms.sourcegitcommit: fcf3546b7cc208155fb8acdf68b81be28afc3d2d
|
||||
ms.sourcegitcommit: 80842b4e4c500daa051eff0ccd7cde91c2d4bb36
|
||||
ms.translationtype: HT
|
||||
ms.contentlocale: ja-JP
|
||||
ms.lasthandoff: 09/10/2022
|
||||
ms.lasthandoff: 09/11/2022
|
||||
ms.locfileid: '145117549'
|
||||
---
|
||||
## ブランチの管理について
|
||||
|
||||
@@ -4,10 +4,10 @@ intro: '{% data variables.product.prodname_desktop %} を使用して、ブラ
|
||||
versions:
|
||||
fpt: '*'
|
||||
ms.openlocfilehash: fb8141710a99b52f1b9a93e1abc0429b5e29f116
|
||||
ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5
|
||||
ms.sourcegitcommit: 80842b4e4c500daa051eff0ccd7cde91c2d4bb36
|
||||
ms.translationtype: HT
|
||||
ms.contentlocale: ja-JP
|
||||
ms.lasthandoff: 09/05/2022
|
||||
ms.lasthandoff: 09/12/2022
|
||||
ms.locfileid: '145117493'
|
||||
---
|
||||
## コミットのスカッシュについて
|
||||
|
||||
@@ -8,11 +8,11 @@ redirect_from:
|
||||
versions:
|
||||
fpt: '*'
|
||||
ms.openlocfilehash: 4947bff541682887817198c714e7e78bff2cfc9f
|
||||
ms.sourcegitcommit: 5b1461b419dbef60ae9dbdf8e905a4df30fc91b7
|
||||
ms.sourcegitcommit: 5f9527483381cfb1e41f2322f67c80554750a47d
|
||||
ms.translationtype: HT
|
||||
ms.contentlocale: ja-JP
|
||||
ms.lasthandoff: 09/10/2022
|
||||
ms.locfileid: '145117341'
|
||||
ms.lasthandoff: 09/11/2022
|
||||
ms.locfileid: '147882780'
|
||||
---
|
||||
## {% data variables.product.prodname_desktop %} のインストールについて
|
||||
|
||||
|
||||
@@ -15,10 +15,10 @@ topics:
|
||||
- GitHub Apps
|
||||
shortTitle: Authentication
|
||||
ms.openlocfilehash: 6862e33adfc29cc1568d5801ac50e44587c86fa9
|
||||
ms.sourcegitcommit: 478f2931167988096ae6478a257f492ecaa11794
|
||||
ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5
|
||||
ms.translationtype: HT
|
||||
ms.contentlocale: ja-JP
|
||||
ms.lasthandoff: 09/09/2022
|
||||
ms.lasthandoff: 09/05/2022
|
||||
ms.locfileid: '147718054'
|
||||
---
|
||||
## 秘密鍵を生成する
|
||||
|
||||
@@ -15,12 +15,12 @@ versions:
|
||||
topics:
|
||||
- GitHub Apps
|
||||
shortTitle: Rate limits
|
||||
ms.openlocfilehash: fd2c9a92c6603a6e64ec17b614f46baf2370c98b
|
||||
ms.sourcegitcommit: d243bbae4ce3c849695b5bc9221e705ee5a4a64f
|
||||
ms.openlocfilehash: 46e1fddabff7d0e9c8d3d21c6a0d18668083ae63
|
||||
ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5
|
||||
ms.translationtype: HT
|
||||
ms.contentlocale: ja-JP
|
||||
ms.lasthandoff: 07/12/2022
|
||||
ms.locfileid: '147081129'
|
||||
ms.lasthandoff: 09/05/2022
|
||||
ms.locfileid: '147710356'
|
||||
---
|
||||
{% data reusables.enterprise.rate_limit %}
|
||||
|
||||
@@ -28,17 +28,17 @@ ms.locfileid: '147081129'
|
||||
|
||||
{% ifversion ghec or fpt %}
|
||||
|
||||
## <a name="about-rate-limits-for-apps"></a>アプリのレート制限について
|
||||
## アプリのレート制限について
|
||||
|
||||
{% 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 %}
|
||||
|
||||
## <a name="server-to-server-requests"></a>サーバーからサーバーへのリクエスト
|
||||
## サーバーからサーバーへのリクエスト
|
||||
|
||||
{% ifversion ghec or fpt %}
|
||||
|
||||
### <a name="default-server-to-server-rate-limits-for--data-variablesproductprodname_dotcom_the_website-"></a>{% data variables.product.prodname_dotcom_the_website %} の既定のサーバー間レート制限
|
||||
### {% data variables.product.prodname_dotcom_the_website %} の既定のサーバー間レート制限
|
||||
|
||||
{% endif %}
|
||||
|
||||
@@ -46,17 +46,17 @@ ms.locfileid: '147081129'
|
||||
|
||||
{% ifversion fpt or ghec %}
|
||||
|
||||
### <a name="server-to-server-rate-limits-for--data-variablesproductprodname_ghe_cloud-"></a>{% data variables.product.prodname_ghe_cloud %}のサーバー間レート制限
|
||||
### {% data variables.product.prodname_ghe_cloud %}のサーバー間レート制限
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% ifversion fpt or ghec %}
|
||||
|
||||
{% data variables.product.product_location %} 上のエンタープライズ内の組織またはリポジトリにインストールされた {% data variables.product.prodname_github_apps %} には、1 時間あたり 15,000 件の要求という制限があります。
|
||||
{% data variables.product.product_location %} 上のエンタープライズ内の Organization にインストールされた {% data variables.product.prodname_github_apps %} には、アプリをインストールした Organization ごとに 1 時間あたり 15,000 件の要求という制限があります。
|
||||
|
||||
{% endif %}
|
||||
|
||||
## <a name="user-to-server-requests"></a>ユーザからサーバーへのリクエスト
|
||||
## ユーザからサーバーへのリクエスト
|
||||
|
||||
{% 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)」を参照してください。
|
||||
|
||||
@@ -64,7 +64,7 @@ ms.locfileid: '147081129'
|
||||
|
||||
{% ifversion fpt or ghec %}
|
||||
|
||||
### <a name="default-user-to-server-rate-limits-for--data-variablesproductprodname_dotcom_the_website-"></a>{% data variables.product.prodname_dotcom_the_website %} の既定のユーザーからサーバー間のレート制限
|
||||
### {% data variables.product.prodname_dotcom_the_website %} の既定のユーザーからサーバー間のレート制限
|
||||
|
||||
{% endif %}
|
||||
|
||||
@@ -78,13 +78,13 @@ ms.locfileid: '147081129'
|
||||
|
||||
{% ifversion fpt or ghec %}
|
||||
|
||||
### <a name="user-to-server-rate-limits-for--data-variablesproductprodname_ghe_cloud-"></a>{% data variables.product.prodname_ghe_cloud %} のユーザーからサーバー間のレート制限
|
||||
### {% data variables.product.prodname_ghe_cloud %} のユーザーからサーバー間のレート制限
|
||||
|
||||
{% data reusables.apps.user-to-server-rate-limits-ghec %}
|
||||
|
||||
{% endif %}
|
||||
|
||||
## <a name="further-reading"></a>参考資料
|
||||
## 参考資料
|
||||
|
||||
- REST API ドキュメントの「[レート制限](/rest/overview/resources-in-the-rest-api#rate-limiting)」
|
||||
- GraphQL API ドキュメントの「[リソースの制限事項](/graphql/overview/resource-limitations)」
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
---
|
||||
title: Scopes for OAuth Apps
|
||||
title: OAuth Appのスコープ
|
||||
intro: '{% data reusables.shortdesc.understanding_scopes_for_oauth_apps %}'
|
||||
redirect_from:
|
||||
- /apps/building-integrations/setting-up-and-registering-oauth-apps/about-scopes-for-oauth-apps
|
||||
@@ -13,18 +13,24 @@ versions:
|
||||
ghec: '*'
|
||||
topics:
|
||||
- OAuth Apps
|
||||
ms.openlocfilehash: e7d943c95dc3d8fea6e025cbae8c5b65f9ccf864
|
||||
ms.sourcegitcommit: 478f2931167988096ae6478a257f492ecaa11794
|
||||
ms.translationtype: HT
|
||||
ms.contentlocale: ja-JP
|
||||
ms.lasthandoff: 09/09/2022
|
||||
ms.locfileid: '147717942'
|
||||
---
|
||||
When setting up an OAuth App on GitHub, requested scopes are displayed to the user on the authorization form.
|
||||
OAuth AppをGitHub上でセットアップする際には、要求されたスコープが認可フォーム上でユーザに表示されます。
|
||||
|
||||
{% note %}
|
||||
|
||||
**Note:** If you're building a GitHub App, you don’t need to provide scopes in your authorization request. For more on this, see "[Identifying and authorizing users for GitHub Apps](/apps/building-github-apps/identifying-and-authorizing-users-for-github-apps/)."
|
||||
**注:** GitHub App を構築している場合は、認可要求でスコープを指定する必要はありません。 詳しくは、「[GitHub App のユーザーの特定と認可](/apps/building-github-apps/identifying-and-authorizing-users-for-github-apps/)」をご覧ください。
|
||||
|
||||
{% endnote %}
|
||||
|
||||
If your {% data variables.product.prodname_oauth_app %} doesn't have access to a browser, such as a CLI tool, then you don't need to specify a scope for users to authenticate to your app. For more information, see "[Authorizing OAuth apps](/developers/apps/authorizing-oauth-apps#device-flow)."
|
||||
CLIツールなど、{% data variables.product.prodname_oauth_app %}がブラウザにアクセスできない場合、アプリケーションを認可するユーザのスコープを指定する必要はありません。 詳しくは、「[OAuth App の認可](/developers/apps/authorizing-oauth-apps#device-flow)」をご覧ください。
|
||||
|
||||
Check headers to see what OAuth scopes you have, and what the API action accepts:
|
||||
どのOAuthスコープを所有しているか、そしてAPIアクションが何を受け付けるかを知るには、ヘッダを確認してください。
|
||||
|
||||
```shell
|
||||
$ curl -H "Authorization: Bearer OAUTH-TOKEN" {% data variables.product.api_url_pre %}/users/codertocat -I
|
||||
@@ -33,58 +39,40 @@ X-OAuth-Scopes: repo, user
|
||||
X-Accepted-OAuth-Scopes: user
|
||||
```
|
||||
|
||||
* `X-OAuth-Scopes` lists the scopes your token has authorized.
|
||||
* `X-Accepted-OAuth-Scopes` lists the scopes that the action checks for.
|
||||
* `X-OAuth-Scopes` には、トークンが認可したスコープが一覧表示されます。
|
||||
* `X-Accepted-OAuth-Scopes` には、アクションがチェックするスコープが一覧表示されます。
|
||||
|
||||
## Available scopes
|
||||
## 利用可能なスコープ
|
||||
|
||||
Name | Description
|
||||
-----|-----------|{% ifversion not ghae %}
|
||||
**`(no scope)`** | Grants read-only access to public information (including user profile info, repository info, and gists){% endif %}{% ifversion ghes or ghae %}
|
||||
**`site_admin`** | Grants site administrators access to [{% data variables.product.prodname_ghe_server %} Administration API endpoints](/rest/reference/enterprise-admin).{% endif %}
|
||||
**`repo`** | Grants full access to public{% ifversion ghec or ghes or ghae %}, internal,{% endif %} and private repositories including read and write access to code, commit statuses, repository invitations, collaborators, deployment statuses, and repository webhooks. **Note**: In addition to repository related resources, the `repo` scope also grants access to manage organization-owned resources including projects, invitations, team memberships and webhooks. This scope also grants the ability to manage projects owned by users.
|
||||
 `repo:status`| Grants read/write access to commit statuses in {% ifversion fpt %}public and private{% elsif ghec or ghes %}public, private, and internal{% elsif ghae %}private and internal{% endif %} repositories. This scope is only necessary to grant other users or services access to private repository commit statuses *without* granting access to the code.
|
||||
 `repo_deployment`| Grants access to [deployment statuses](/rest/reference/repos#deployments) for {% ifversion not ghae %}public{% else %}internal{% endif %} and private repositories. This scope is only necessary to grant other users or services access to deployment statuses, *without* granting access to the code.{% ifversion not ghae %}
|
||||
 `public_repo`| Limits access to public repositories. That includes read/write access to code, commit statuses, repository projects, collaborators, and deployment statuses for public repositories and organizations. Also required for starring public repositories.{% endif %}
|
||||
 `repo:invite` | Grants accept/decline abilities for invitations to collaborate on a repository. This scope is only necessary to grant other users or services access to invites *without* granting access to the code.{% ifversion fpt or ghes or ghec %}
|
||||
 `security_events` | Grants: <br/> read and write access to security events in the [{% data variables.product.prodname_code_scanning %} API](/rest/reference/code-scanning) {%- ifversion ghec %}<br/> read and write access to security events in the [{% data variables.product.prodname_secret_scanning %} API](/rest/reference/secret-scanning){%- endif %} <br/> This scope is only necessary to grant other users or services access to security events *without* granting access to the code.{% endif %}
|
||||
**`admin:repo_hook`** | Grants read, write, ping, and delete access to repository hooks in {% ifversion fpt %}public or private{% elsif ghec or ghes %}public, private, or internal{% elsif ghae %}private or internal{% endif %} repositories. The `repo` {% ifversion fpt or ghec or ghes %}and `public_repo` scopes grant{% else %}scope grants{% endif %} full access to repositories, including repository hooks. Use the `admin:repo_hook` scope to limit access to only repository hooks.
|
||||
 `write:repo_hook` | Grants read, write, and ping access to hooks in {% ifversion fpt %}public or private{% elsif ghec or ghes %}public, private, or internal{% elsif ghae %}private or internal{% endif %} repositories.
|
||||
 `read:repo_hook`| Grants read and ping access to hooks in {% ifversion fpt %}public or private{% elsif ghec or ghes %}public, private, or internal{% elsif ghae %}private or internal{% endif %} repositories.
|
||||
**`admin:org`** | Fully manage the organization and its teams, projects, and memberships.
|
||||
 `write:org`| Read and write access to organization membership, organization projects, and team membership.
|
||||
 `read:org`| Read-only access to organization membership, organization projects, and team membership.
|
||||
**`admin:public_key`** | Fully manage public keys.
|
||||
 `write:public_key`| Create, list, and view details for public keys.
|
||||
 `read:public_key`| List and view details for public keys.
|
||||
**`admin:org_hook`** | Grants read, write, ping, and delete access to organization hooks. **Note:** OAuth tokens will only be able to perform these actions on organization hooks which were created by the OAuth App. Personal access tokens will only be able to perform these actions on organization hooks created by a user.
|
||||
**`gist`** | Grants write access to gists.
|
||||
**`notifications`** | Grants: <br/>* read access to a user's notifications <br/>* mark as read access to threads <br/>* watch and unwatch access to a repository, and <br/>* read, write, and delete access to thread subscriptions.
|
||||
**`user`** | Grants read/write access to profile info only. Note that this scope includes `user:email` and `user:follow`.
|
||||
 `read:user`| Grants access to read a user's profile data.
|
||||
 `user:email`| Grants read access to a user's email addresses.
|
||||
 `user:follow`| Grants access to follow or unfollow other users.{% ifversion projects-oauth-scope %}
|
||||
**`project`** | Grants read/write access to user and organization {% data variables.projects.projects_v2 %}.
|
||||
 `read:project`| Grants read only access to user and organization {% data variables.projects.projects_v2 %}.{% endif %}
|
||||
**`delete_repo`** | Grants access to delete adminable repositories.
|
||||
**`write:discussion`** | Allows read and write access for team discussions.
|
||||
 `read:discussion` | Allows read access for team discussions.
|
||||
**`write:packages`** | Grants access to upload or publish a package in {% data variables.product.prodname_registry %}. For more information, see "[Publishing a package](/github/managing-packages-with-github-packages/publishing-a-package)".
|
||||
**`read:packages`** | Grants access to download or install packages from {% data variables.product.prodname_registry %}. For more information, see "[Installing a package](/github/managing-packages-with-github-packages/installing-a-package)".
|
||||
**`delete:packages`** | Grants access to delete packages from {% data variables.product.prodname_registry %}. For more information, see "[Deleting and restoring a package](/packages/learn-github-packages/deleting-and-restoring-a-package)."
|
||||
**`admin:gpg_key`** | Fully manage GPG keys.
|
||||
 `write:gpg_key`| Create, list, and view details for GPG keys.
|
||||
 `read:gpg_key`| List and view details for GPG keys.{% ifversion fpt or ghec %}
|
||||
**`codespace`** | Grants the ability to create and manage codespaces. Codespaces can expose a GITHUB_TOKEN which may have a different set of scopes. For more information, see "[Security in {% data variables.product.prodname_github_codespaces %}](/codespaces/codespaces-reference/security-in-github-codespaces#authentication)."{% endif %}
|
||||
**`workflow`** | Grants the ability to add and update {% data variables.product.prodname_actions %} workflow files. Workflow files can be committed without this scope if the same file (with both the same path and contents) exists on another branch in the same repository. Workflow files can expose `GITHUB_TOKEN` which may have a different set of scopes. For more information, see "[Authentication in a workflow](/actions/reference/authentication-in-a-workflow#permissions-for-the-github_token)."{% ifversion not fpt %}
|
||||
**`admin:enterprise`** | Gives full control of enterprise functionality. For more information, see "[Managing enterprise accounts](/graphql/guides/managing-enterprise-accounts)" in the GraphQL API documentation.<br><br>Includes `manage_runners:enterprise`{% ifversion ghec or ghes > 3.3 %}, `manage_billing:enterprise`,{% endif %} and `read:enterprise`.
|
||||
 `manage_runners:enterprise` | Gives full control over self-hosted runners within the enterprise. For more information, see "[About self-hosted runners](/actions/hosting-your-own-runners/about-self-hosted-runners)." {% ifversion ghec or ghes > 3.3 %}
|
||||
 `manage_billing:enterprise` | Read and write enterprise billing data. For more information, see "[Billing](/rest/billing)" in the REST API documentation. {% endif %}
|
||||
 `read:enterprise` | Read all data on an enterprise profile. Does not include profile data of enterprise members or organizations.{% endif %}
|
||||
{% note %}
|
||||
名前|説明-----|-----------|{% ifversion not ghae %} **`(no scope)`** |パブリック情報 (ユーザー プロファイル情報、リポジトリ情報、gists を含む) {% endif %}{% ifversion ghes or ghae %} **`site_admin`** への読み取り専用アクセスを許可|サイト管理者に [{% data variables.product.prodname_ghe_server %} 管理 API エンドポイント](/rest/reference/enterprise-admin)へのアクセスを許可します。{% endif %} **`repo`** |public{% ifversion ghec or ghes or ghae %}、internal、{% endif %}、プライベート リポジトリへのフル アクセスを許可します。これには、コードへの読み取りと書き込みのアクセス、コミットの状態、リポジトリへの招待、コラボレーター、デプロイの状態、リポジトリ Webhook が含まれます。 **注**: `repo` スコープでは、リポジトリ関連のリソースに加えて、Organization 所有のリソース (プロジェクト、招待、Team メンバーシップ、Webhook) を管理するためのアクセスも許可されます。 さらに、ユーザー所有のプロジェクトを管理する権限も許可されます。
|
||||
 `repo:status`| {% ifversion fpt %}パブリックおよびプライベート {% elsif ghec or ghes %}パブリック、プライベート、内部{% elsif ghae %}プライベートおよび内部{% endif %}リポジトリのコミット ステータスに対する読み取り/書き込みアクセスを許可します。 このスコープは、コードへのアクセスを許可 *せずに*、他のユーザーまたはサービスにプライベート リポジトリコミットステータスへのアクセス権を付与する場合にのみ必要です。
|
||||
 `repo_deployment`| {% ifversion not ghae %}パブリック{% else %}内部{% endif %}およびプライベート リポジトリの[デプロイ ステータス](/rest/reference/repos#deployments)に対するアクセスを許可します。 このスコープは、コードへのアクセスを許可 *せずに*、展開状態へのアクセス権を他のユーザーまたはサービスに付与する場合にのみ必要です。{% ifversion not ghae %}  `public_repo`|パブリック リポジトリへのアクセスを制限します。 これには、コード、コミットステータス、リポジトリプロジェクト、コラボレータ、パブリックリポジトリ及びOrganizationのデプロイメントステータスへの読み書きアクセスが含まれます。 パブリック リポジトリにスターを付けるためにも必要です。{% endif %}  `repo:invite` | リポジトリにおける共同作業への招待の承諾/拒否権限を付与します。 このスコープは、コードへのアクセスを許可 *せずに*、他のユーザーまたはサービスに招待へのアクセス権を付与する場合にのみ必要です。{% ifversion fpt or ghes or ghec %}  `security_events` |補助 金: <br/> [{% data variables.product.prodname_code_scanning %} API](/rest/reference/code-scanning) でのセキュリティ イベントに対する読み取りおよび書き込みアクセス{%- ifversion ghec %}<br/> [{% data variables.product.prodname_secret_scanning %} API](/rest/reference/secret-scanning) でのセキュリティ イベントに対する読み取りおよび書き込みアクセス{%- endif %} <br/> このスコープは、コードへのアクセスを許可 *せずに*、他のユーザーまたはサービスにセキュリティ イベントへのアクセス権を付与する場合にのみ必要です。{% endif %} **`admin:repo_hook`** |{% ifversion fpt %}public または private{% elsif ghec or ghes %}public、private、または internal{% elsif ghae %}private または internal{% endif %} リポジトリのリポジトリ フックへの読み取り、書き込み、ping、および削除アクセスを許可します。 `repo` {% ifversion fpt or ghec or ghes %}および `public_repo` スコープは、{% else %}スコープは、{% endif %}リポジトリ フックを含む、リポジトリに対する完全なアクセスを許可します。 アクセスをリポジトリ フックのみに限定するには、`admin:repo_hook` スコープを使用してください。
|
||||
 `write:repo_hook` | {% ifversion fpt %}パブリックまたはプライベート {% elsif ghec or ghes %}パブリック、プライベート、または内部{% elsif ghae %}プライベートまたは内部{% endif %}リポジトリのフックに対する読み取り、書き込み、ping アクセスを許可します。
|
||||
 `read:repo_hook`| {% ifversion fpt %}パブリックまたはプライベート {% elsif ghec or ghes %}パブリック、プライベート、または内部{% elsif ghae %}プライベートまたは内部{% endif %}リポジトリのフックに対する読み取りおよび ping アクセスを許可します。
|
||||
**`admin:org`** | Organization とその Team、プロジェクト、メンバーシップを全面的に管理できます。
|
||||
 `write:org`| Organization のメンバーシップ、Organization のプロジェクト、Team のメンバーシップに対する読み取りおよび書き込みアクセス。
|
||||
 `read:org`| Organization のメンバーシップ、Organization のプロジェクト、Team のメンバーシップに対する読み取り専用アクセス。
|
||||
**`admin:public_key`** | 公開鍵を全面的に管理できます。
|
||||
 `write:public_key`| 公開鍵の作成、一覧表示、詳細の表示ができます。
|
||||
 `read:public_key`| 公開鍵の一覧表示と詳細の表示ができます。
|
||||
**`admin:org_hook`** | Organization フックに対する読み取り、書き込み、ping、削除アクセスを許可します。 **注:** OAuth トークンがこれらのアクションを実行できるのは、OAuth App によって作成された Organization フックに対してのみです。 個人アクセストークンがこれらのアクションを行えるのは、ユーザが作成したOrganizationフックに対してのみです。
|
||||
**`gist`** | gist に対する書き込みアクセスを許可します。
|
||||
**`notifications`** | 以下を許可します: <br/>* ユーザーの通知に対する読み取りアクセス <br/>* スレッドに対する既読としてマーク アクセス <br/>* リポジトリに対するウォッチおよびウォッチ解除アクセス <br/>* スレッドのサブスクリプションに対する読み取り、書き込み、削除アクセス。
|
||||
**`user`** | プロフィール情報のみに対する読み取り/書き込みアクセスを許可します。 このスコープには `user:email` と `user:follow` が含まれることにご注意ください。
|
||||
 `read:user`| ユーザーのプロフィール データに対する読み取りアクセスを許可します。
|
||||
 `user:email`| ユーザーのメール アドレスに対する読み取りアクセスを許可します。
|
||||
 `user:follow`| 他のユーザーをフォローまたはフォロー解除するためのアクセスを許可します。{% ifversion projects-oauth-scope %} **`project`** | ユーザーおよび Organization の {% data variables.projects.projects_v2 %} への読み取り/書き込みアクセスを許可します。
|
||||
 `read:project`| ユーザーおよび Organization の {% data variables.projects.projects_v2 %} への読み取り専用アクセスを許可します。{% endif %} **`delete_repo`** | 管理可能なリポジトリを削除するためのアクセスを許可します。
|
||||
**`write:discussion`** | Team のディスカッションの読み取りおよび書き込みアクセスを許可します。
|
||||
 `read:discussion` | Team のディスカッションの読み取りアクセスを許可します。
|
||||
**`write:packages`** | {% data variables.product.prodname_registry %} でパッケージをアップロードまたは公開するためのアクセスを許可します。 詳しくは、「[パッケージを公開する](/github/managing-packages-with-github-packages/publishing-a-package)」をご覧ください。
|
||||
**`read:packages`** | {% data variables.product.prodname_registry %} からパッケージをダウンロードまたはインストールするためのアクセスを許可します。 詳しくは、「[パッケージのインストール](/github/managing-packages-with-github-packages/installing-a-package)」をご覧ください。
|
||||
**`delete:packages`** | {% data variables.product.prodname_registry %} からパッケージを削除するアクセス権を付与します。 詳しくは、「[パッケージを削除および復元する](/packages/learn-github-packages/deleting-and-restoring-a-package)」をご覧ください。
|
||||
**`admin:gpg_key`** | GPG キーを完全に管理できます。
|
||||
 `write:gpg_key`| GPG キーの作成、一覧表示、詳細の表示ができます。
|
||||
 `read:gpg_key`| GPG キーの一覧表示と詳細の表示ができます。{% ifversion fpt or ghec %} **`codespace`** | codespace の作成および管理権限を付与します。 codespace は、スコープのセットが異なる可能性がある GITHUB_TOKEN を公開する場合があります。 詳しくは、「[{% data variables.product.prodname_github_codespaces %} のセキュリティ](/codespaces/codespaces-reference/security-in-github-codespaces#authentication)」をご覧ください。{% endif %} **`workflow`** | {% data variables.product.prodname_actions %} のワークフロー ファイルの追加および更新権限を付与します。 同じリポジトリ内の他のブランチに同じファイル(パスと内容が同じ)が存在する場合、ワークフローファイルはこのスコープがなくてもコミットできます。 ワークフロー ファイルは、スコープのセットが異なる可能性がある `GITHUB_TOKEN` を公開する場合があります。 詳しくは、[ワークフローでの認証](/actions/reference/authentication-in-a-workflow#permissions-for-the-github_token)に関するページを参照してください。{% ifversion not fpt %} **`admin:enterprise`** | エンタープライズ機能の完全な制御権を付与する。 詳しくは、GraphQL API ドキュメントにある「[Enterprise アカウントの管理](/graphql/guides/managing-enterprise-accounts)」を参照してください。<br><br>`manage_runners:enterprise`{% ifversion ghec or ghes > 3.3 %}、`manage_billing:enterprise`、{% endif %}および `read:enterprise` を含めます。  `manage_runners:enterprise` | Enterprise 内のセルフホステッド ランナーに対する完全な制御権を付与する。 詳細については、[セルフホステッド ランナー](/actions/hosting-your-own-runners/about-self-hosted-runners)に関する記述をご覧ください。 {% ifversion ghec or ghes > 3.3 %}  `manage_billing:enterprise` | Enterprise 課金データの読み取りと書き込み。 詳しくは、REST API のドキュメントの「[課金](/rest/billing)」を参照してください。 {% endif %}  `read:enterprise` | Enterprise プロファイルのすべてのデータを読み取る。 Enterprise メンバーまたは Organization のプロファイル データは含めません。{% endif %} {% note %}
|
||||
|
||||
**Note:** Your OAuth App can request the scopes in the initial redirection. You
|
||||
can specify multiple scopes by separating them with a space using `%20`:
|
||||
**注:** OAuth App は最初のリダイレクトでスコープを要求できます。 複数のスコープを指定するには、スコープを空白で区切ります (`%20` を使用)。
|
||||
|
||||
https://github.com/login/oauth/authorize?
|
||||
client_id=...&
|
||||
@@ -92,31 +80,18 @@ can specify multiple scopes by separating them with a space using `%20`:
|
||||
|
||||
{% endnote %}
|
||||
|
||||
## Requested scopes and granted scopes
|
||||
## リクエストされたスコープと許可されたスコープ
|
||||
|
||||
The `scope` attribute lists scopes attached to the token that were granted by
|
||||
the user. Normally, these scopes will be identical to what you requested.
|
||||
However, users can edit their scopes, effectively
|
||||
granting your application less access than you originally requested. Also, users
|
||||
can edit token scopes after the OAuth flow is completed.
|
||||
You should be aware of this possibility and adjust your application's behavior
|
||||
accordingly.
|
||||
`scope` 属性は、トークンに付随する、ユーザーによって許可されたスコープを一覧表示します。 通常、これらのスコープはリクエストされたものと同じになります。
|
||||
しかし、ユーザーはスコープを編集して、実質的には元々要求されたアクセスよりも少ないアクセスをアプリケーションに対して許可できます。 また、ユーザーは OAuth フローが完了した後にトークンのスコープを編集することもできます。
|
||||
この可能性を認識しておき、それに応じたアプリケーションの動作の調整が必要になります。
|
||||
|
||||
It's important to handle error cases where a user chooses to grant you
|
||||
less access than you originally requested. For example, applications can warn
|
||||
or otherwise communicate with their users that they will see reduced
|
||||
functionality or be unable to perform some actions.
|
||||
元々要求されたアクセスよりも少ないアクセスをユーザーが許可した場合のエラー ケースを処理することが重要です。 たとえば、アプリケーションはユーザーに対して、機能の低下や一部のアクションが実行できないことを警告したり、知らせたりすることができます。
|
||||
|
||||
Also, applications can always send users back through the flow again to get
|
||||
additional permission, but don’t forget that users can always say no.
|
||||
また、アプリケーションはいつでもユーザーをもう一度フローに戻して追加の権限を得ようとすることができますが、ユーザーは常に拒否できることを忘れないようにしてください。
|
||||
|
||||
Check out the [Basics of Authentication guide](/guides/basics-of-authentication/), which
|
||||
provides tips on handling modifiable token scopes.
|
||||
変更できるトークンのスコープの扱いに関するヒントが提供されている[認証の基本ガイド](/guides/basics-of-authentication/)をご確認ください。
|
||||
|
||||
## Normalized scopes
|
||||
## 正規化されたスコープ
|
||||
|
||||
When requesting multiple scopes, the token is saved with a normalized list
|
||||
of scopes, discarding those that are implicitly included by another requested
|
||||
scope. For example, requesting `user,gist,user:email` will result in a
|
||||
token with `user` and `gist` scopes only since the access granted with
|
||||
`user:email` scope is included in the `user` scope.
|
||||
複数のスコープが要求された場合、トークンは正規化されたスコープのリストとともに保存され、要求された別のスコープに暗黙的に含まれているスコープは破棄されます。 たとえば `user,gist,user:email` を要求すると、トークンには `user` と `gist` スコープのみが含まれます。これは、`user:email` スコープで許可されるアクセスは `user` スコープに含まれているからです。
|
||||
|
||||
@@ -13,11 +13,11 @@ versions:
|
||||
topics:
|
||||
- GitHub Apps
|
||||
ms.openlocfilehash: 9038a938d26aa5f1e9ec3cdec6fcecd417f0baf8
|
||||
ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5
|
||||
ms.sourcegitcommit: fcf3546b7cc208155fb8acdf68b81be28afc3d2d
|
||||
ms.translationtype: HT
|
||||
ms.contentlocale: ja-JP
|
||||
ms.lasthandoff: 09/05/2022
|
||||
ms.locfileid: '146178504'
|
||||
ms.lasthandoff: 09/11/2022
|
||||
ms.locfileid: '147885861'
|
||||
---
|
||||
{% 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. 「Basic information(基本情報)」で、修正したいGitHub Appの情報を変更してください。
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user