![Forrest logo](/images/logo.png)
gh-secret-set:tldr:34413
gh-secret-set: Set an organization secret with a specific visibility.
$ gh secret set ${name} --org ${organization} --visibility ${select}
try on your machine
This command is using the command-line tool "gh" to set a secret in GitHub.
Here is an explanation of each element in the command:
gh
: It refers to the GitHub CLI (Command Line Interface) tool, which allows you to interact with GitHub from the command line.secret set
: This is a command within "gh" CLI that allows you to set a secret in a GitHub repository or organization.${name}
: This is a placeholder for the name of the secret you want to set. Replace${name}
with the actual name of the secret you want to set.--org ${organization}
: This flag specifies the GitHub organization where the secret will be set. Replace${organization}
with the actual name of the organization. If you want to set the secret in a repository instead of an organization, you can use--repo ${repository}
flag instead, replacing${repository}
with the actual repository name.--visibility ${select}
: This flag specifies the visibility level of the secret. Replace${select}
with one of the available visibility options:all
,private
, orselected
. Theall
option makes the secret available to all repositories in the organization,private
restricts it to private repositories, andselected
allows you to choose specific repositories where the secret will be available.
When running this command with the appropriate values, it will set a secret with the provided name in the specified organization or repository, with the specified visibility level.
This explanation was created by an AI. In most cases those are correct. But please always be careful and
never run a command you are not sure if it is safe.