A simple CLI to manage GitHub secrets, that are used with GitHub Actions
Project description
githubsecrets
A simple CLI to manage GitHub secrets, that are used with GitHub Actions
Requirements
-
Python v3.6.7 and above
-
POSIX - Linux, macOS or Windows with Git Bash
Installation
pip
Available at PyPi
$ pip install githubsecrets
Getting Started
-
Initialize this application - Creates a credential file at
~/.githubsecrets/credentials
$ ghs init
-
Generate a GitHub Personal-Access-Token with the following permssions:
- repo (all)
- admin:public_key > read:public_key
-
Save the token in a safe place, we'll use it in the next step
-
Create a profile
$ ghs profile-apply -p willy_wonka ... SUCCESS: Applied the profile willy_wonka
You'll be prompted to insert:
- Github owner- which is your GitHub Organization or GitHub Account name
- Personal access token - that you've created in the previous steps
-
Create a GitHub secret
ghs secret-apply -p willy_wonka -r github-secrets
You'll be prompted to insert:
- Secret name
- Secret value
Status codes
- 200 - success
- 204 - success
- 404 - secret or repository not found
Available commands
View all available commands with ghs --help
Usage: ghs [OPTIONS] COMMAND [ARGS]...
All commands can run without providing options, and then you'll be
prompted to insert values.
Secrets' values and Personal-Access-Tokens are hidden when prompted
Options:
--help Show this message and exit.
Commands:
init Create a credentials file to store your profiles
profile-apply Create or modify a profile
profile-delete Delete a profile
profile-list List all profile - truncates personal access tokens
secret-apply Create or modify a secret in a GitHub repository
secret-delete Delete a secret in a GitHub repository
secret-get Get a secret from a GitHub repository
secret-list List all secret in a GitHub repository
Contributing
Report issues/questions/feature requests on in the Issues section.
Pull requests are welcome! Ideally, create a feature branch and issue for every single change you make. These are the steps:
- Fork this repo
- Create your feature branch from master (
git checkout -b my-new-feature
) - Commit your remarkable changes (
git commit -am 'Added some feature'
) - Push to the branch (
git push --set-up-stream origin my-new-feature
) - Create a new Pull Request and tell us about your changes
Authors
Created and maintained by Meir Gabay
License
This project is licensed under the MIT License - see the LICENSE file for details
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for githubsecrets-0.0.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1e7f63b4e7dbf23bffba73b7b82c34a29b338dc5add18a38ef6470c8118bec05 |
|
MD5 | e77554c658f3114a7abf195a1542b268 |
|
BLAKE2b-256 | ef4b5c422728ba1b594f14e2541db33a0b29e855843b6fa0293bcbc689607a63 |