gh secret set
Create or update secrets
Synopsis
Locally encrypt a new or updated secret at either the repository or organization level and send it to GitHub for storage.
gh secret set <secret-name> [flags]
Examples
$ 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"
Options
-b, --body string A value for the secret. Reads from STDIN if not specified.
-o, --org string List secrets for an organization
-r, --repos selected List of repository names for selected visibility
-v, --visibility all Set visibility for an organization secret: all, `private`, or `selected` (default "private")
Options inherited from parent commands
--help Show help for command
-R, --repo [HOST/]OWNER/REPO Select another repository using the [HOST/]OWNER/REPO format