Documentation
¶
Overview ¶
newusersecretwithxcrypto creates a new secret in GitHub for a given user. newusersecretwithxcrypto uses x/crypto/nacl/box instead of sodium. It does not depend on any native libraries and is easier to cross-compile for different platforms. Quite possibly there is a performance penalty due to this.
newusersecretwithxcrypto takes in one argument for the name of the secret to add, and 2 flags owner, repo. If owner/repo are defined then it adds the secret to that repository The secret value is pulled from an environment variable based on the secret name. To authenticate with GitHub, provide your token via an environment variable GITHUB_AUTH_TOKEN.
To verify the new secret, navigate to GitHub User > Settings > left side options bar > Codespaces > Secrets.
Usage:
export GITHUB_AUTH_TOKEN=<auth token from github that has secret create rights> export SECRET_VARIABLE=<secret value of the secret variable> go run main.go SECRET_VARIABLE
Example:
export GITHUB_AUTH_TOKEN=0000000000000000 export SECRET_VARIABLE="my-secret" go run main.go SECRET_VARIABLE