gh-secret-list(1)

gh-secret-list1

List secrets

Usage

gh secret list [flags]

Overview

List secrets on one of the following levels: - repository (default): available to GitHub Actions runs, Agents sessions, or Dependabot in a repository - environment: available to GitHub Actions runs for a deployment environment in a repository - organization: available to GitHub Actions runs, Agents sessions, Dependabot, or Codespaces within an organization - user: available to Codespaces for your user

Options

-a, --app <string>

List secrets for a specific application: {actions|agents|codespaces|dependabot}

-e, --env <string>

List secrets for an environment

-q, --jq <expression>

Filter JSON output using a jq expression

--json <fields>

Output JSON with the specified fields

-o, --org <string>

List secrets for an organization

-t, --template <string>

Format JSON output using a Go template; see "gh help formatting"

-u, --user

List a secret for your user

Options inherited from parent commands

-R, --repo <[HOST/]OWNER/REPO>

Select another repository using the [HOST/]OWNER/REPO format

Aliases

gh secret ls

Json fields

name, numSelectedRepos, selectedReposURL, updatedAt, visibility

Exit status

0: Successful execution

1: Error

2: Command canceled

4: Authentication required

NOTE: Specific commands may have additional exit codes. Refer to the command's help for more information.

Releases

3 releases since Debian 12 (Bookworm); the text changed 2 times.

  1. 12
  2. 13
  3. Arch

--jq since Debian 13 (Trixie); --json since Debian 13 (Trixie); --template since Debian 13 (Trixie); -q since Debian 13 (Trixie); -t since Debian 13 (Trixie).

From github-cli 2.102.1-1 in Arch Linux 2026-11-01. Parsed by carta from the page's man source.