https://github.com/jftuga/gh-token
Add or delete the "github.com" internet password from a MacOS Keychain file
https://github.com/jftuga/gh-token
github github-token keepass keepassxc python
Last synced: about 1 year ago
JSON representation
Add or delete the "github.com" internet password from a MacOS Keychain file
- Host: GitHub
- URL: https://github.com/jftuga/gh-token
- Owner: jftuga
- License: mit
- Created: 2024-07-17T11:25:35.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-07-17T11:45:24.000Z (over 1 year ago)
- Last Synced: 2025-01-29T23:29:53.728Z (about 1 year ago)
- Topics: github, github-token, keepass, keepassxc, python
- Language: Python
- Homepage:
- Size: 5.86 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# gh-token
`gh-token` opens a KeePass file that contains GitHub fine-grained tokens and
then uses the user-selected token to add or delete the `github.com` internet
password from a MacOS Keychain file.
It provides a `fzf` style menu to assist in selecting the token from the KeePass file.
If the `github.com` internet password already exists, the `add` operation
will overwrite this entry with the newly selected token password.
**NOTE:** Decryption of the KeePass file can be very slow, especially if using a `KEY_FILE`.
## Install
```shell
git clone https://github.com/jftuga/gh-token
cd gh-token
python -m venv venv
source venv/bin/activate
pip install -r requirements.txt
python gh-token.py tokens.kdbx your-github-username add
```
## Usage
```
Usage:
gh-token.py [add|rm]
If you want to use a keychain file, then use:
KEY_FILE=My-KeePass-KeyFile gh-token.py [add|rm]
```
## Acknowledgements
**Modules used:**
* pykeepass - https://github.com/libkeepass/pykeepass
* pzp - https://github.com/andreax79/pzp
## Disclaimer Notification
This program is my own original idea and was completely developed on my own personal time,
for my own personal benefit, and on my personally owned equipment.