Crates.io | saint-peter |
lib.rs | saint-peter |
version | 1.1.0 |
source | src |
created_at | 2022-10-30 17:19:09.544388 |
updated_at | 2024-05-21 10:18:37.771124 |
description | git ssh keys store and manager |
homepage | |
repository | |
max_upload_size | |
id | 701554 |
size | 83,581 |
Having multiple github accounts is not supported easily by the git cli tool, this tool provides that functionality.
It stores keyname, username, email and ssh-key, when switching key it will also switch the username and email, so that you won't push using the wrong account.
cargo build --release
sudo install target/release/saint-peter /usr/bin/saint-peter
Or from crates.io:
cargo install saint-peter
Use ~/.ssh/SAINT_PETER_GIT_KEY
in your configuration to use saint-peter as key-store.
NOTE: you can change the above key position using the
--output-file
option. [default:~/.ssh/SAINT_PETER_GIT_KEY
]
Host github.com
HostName github.com
User git
IdentityFile ~/.ssh/SAINT_PETER_GIT_KEY
saint-peter add \
--name <username> \
--email <email> \
<keyname>
saint-peter add-existing \
--name <username> \
--email <email> \
--file ~/.ssh/<ssh_key_name> \
<keyname>
NOTE: The old file can be deleted as it is stored inside the internal store
saint-peter set-current <keyname>
saint-peter use <keyname>
saint-peter get-pub <keyname>
NOTE: Useful in order to add the key to a service like github
saint-peter delete <keyname>
The configuration is in plain json, if one need to change any of the data, like username or email, it can be done easily in the stored json.
NOTE: position of this file can be changed with the
--config
option [default:~/.config/saint-peter.json
]