Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dhensby/keysync
https://github.com/dhensby/keysync
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/dhensby/keysync
- Owner: dhensby
- License: bsd-3-clause
- Created: 2018-09-18T21:37:42.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2023-02-05T01:58:00.000Z (almost 2 years ago)
- Last Synced: 2024-05-17T00:19:32.907Z (6 months ago)
- Language: Go
- Size: 64.5 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# keysync
`keysync` is a CLI tool for keeping the `authorized_keys` file on your servers
in sync with your GitHub user's public keys.This is done by connecting to the GitHub API and fetching the [user's publicly
available keys](https://developer.github.com/v3/users/keys/#list-public-keys-for-a-user).The tool will keep existing keys intact whilst adding the keys from GitHub separately.
Keys removed from GitHub will also be removed from the file.## Usage
To use the CLI tool, download the [latest version](https://github.com/dhensby/keysync/releases/latest)
for your system and get started by running `keysync -gh-user [username]` as the
user you wish to update the keys for.The tool can be run on behalf of other users on the server `keysync -user [localuser] -gh-user [username]`.
## Setting up a cronjob
You can set up a cronjob to run as often as you like to keep things in sync. Run
`crontab -e` as your user, or `crontab -e -u [localuser]` to set one up on behalf
of another user, and add the following to sync your keys every 5 minutes:```cron
*/5 * * * * /path/to/keysync -gh-user octocat
```## Pushover integration
You can get simple push notifications to your phone via [Pushover](https://pushover.net/).
Create an account, and add a `.keysync.config` file in the same directory as the executable;
the file should be a JSON file formatted as so:```json
{
"PushoverAppKey": "...",
"PushoverUserKey": "..."
}
```