Naming your secrets
ヒント
To help ensure that GitHub redacts your secrets in logs correctly, avoid using structured data as the values of secrets.
The following rules apply to secret names:
- 英数字 (
[a-z]
、[A-Z]
、[0-9]
) またはアンダースコア (_
) のみを含めることができます。 スペースは使用できません。 GITHUB_
プレフィックスで始めることはできません。- 最初を数字にすることはできません。
- 参照されるとき、大文字と小文字が区別されません。 GitHub は、入力方法に関係なく、シークレット名を大文字として格納します。
- 作成されたリポジトリ、organization、または Enterprise に固有のものにする必要があります。
複数のレベルで同じ名前のシークレットが存在する場合、最も低いレベルのシークレットが優先されます。 たとえば、Organization レベルのシークレット名がリポジトリレベルのシークレット名と同じ場合、リポジトリレベルのシークレット名が優先されます。 Similarly, if an organization, repository, and environment all have a secret with the same name, the environment-level secret takes precedence.
Limits for secrets
You can store up to 1,000 organization secrets, 100 repository secrets, and 100 environment secrets.
A workflow created in a repository can access the following number of secrets:
- All 100 repository secrets.
- If the repository is assigned access to more than 100 organization secrets, the workflow can only use the first 100 organization secrets (sorted alphabetically by secret name).
- All 100 environment secrets.
Secrets are limited to 48 KB in size. To store larger secrets, see GitHub Actions でのシークレットの使用.
When GitHub Actions reads secrets
Organization and repository secrets are read when a workflow run is queued, and environment secrets are read when a job referencing the environment starts.
Automatically redacted secrets
GitHub automatically redacts the following sensitive information from workflow logs.
- 32-byte and 64-byte Azure keys
- Azure AD client app passwords
- Azure Cache keys
- Azure Container Registry keys
- Azure Function host keys
- Azure Search keys
- Database connection strings
- HTTP Bearer token headers
- JWTs
- NPM author tokens
- NuGet API keys
- v1 GitHub installation tokens
- v2 GitHub installation tokens (
ghp
,gho
,ghu
,ghs
,ghr
) - v2 GitHub PATs