LinuxCommandLibrary

gh-environment

manage deployment environments and protection rules

TLDR

List environments

$ gh environment list
copy
View environment details
$ gh environment view [env_name]
copy

SYNOPSIS

gh environment command [options]

DESCRIPTION

gh environment manages GitHub repository environments used in deployment workflows. Environments represent deployment targets like production, staging, or development with configurable protection rules and environment-specific secrets.
Protection rules can require manual approvals, enforce wait timers, or restrict deployments to specific branches. Environment secrets provide secure storage for credentials and configuration needed for deployments without exposing them in workflow files.
Managing environments through the CLI enables automation of deployment infrastructure setup and configuration.

PARAMETERS

-R, --repo owner/repo

Repository.

SUBCOMMANDS

list

List environments.
view
View environment details.

SEE ALSO

gh(1), gh-secret(1)

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community