newreposecretwithxcrypto

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

newreposecretwithxcrypto creates a new secret in GitHub for a given owner/repo. newreposecretwithxcrypto 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.

newreposecretwithxcrypto has two required flags for owner and repo, and takes in one argument for the name of the secret to add. 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 Repository > Settings > left side options bar > 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 -owner <owner name> -repo <repository name> SECRET_VARIABLE

Example:

export GITHUB_AUTH_TOKEN=0000000000000000
export SECRET_VARIABLE="my-secret"
go run main.go -owner google -repo go-github SECRET_VARIABLE

Jump to

Keyboard shortcuts

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