gh(1)

NAME

gh-secret-set - Create or update secrets

SYNOPSIS

gh secret set [flags]

DESCRIPTION

Locally encrypt a new or updated secret at either the repository or organization level and send it to GitHub for storage.

OPTIONS

-b, --body=""
    A value for the secret. Reads from STDIN if not specified.

-o, --org=""
    List secrets for an organization

-r, --repos=[]
    List of repository names for selected visibility

-v, --visibility="private"
    Set visibility for an organization secret: all, private, or selected

OPTIONS INHERITED FROM PARENT COMMANDS

--help[=false]
    Show help for command

-R, --repo=""
    Select another repository using the [HOST/]OWNER/REPO format

EXAMPLE

    $ gh secret set FROM_FLAG  -b"some literal value"
    $ gh secret set FROM_ENV  -b"${ENV_VALUE}"
    $ gh secret set FROM_FILE < file.json
    $ gh secret set ORG_SECRET -bval --org=anOrg --visibility=all
    $ gh secret set ORG_SECRET -bval --org=anOrg --repos="repo1,repo2,repo3"

SEE ALSO

gh-secret(1)