newusersecretwithxcrypto

command
v0.0.0-...-d2149c9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 4, 2024 License: BSD-3-Clause Imports: 9 Imported by: 0

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL