Skip to content

Use GitHub as a centralized repository of SSH keys

License

Notifications You must be signed in to change notification settings

guewen/github_pki

 
 

Repository files navigation

GitHub PKI

Docker Pulls Go Report Card By Camptocamp

github_pki is a command that can be used to retrieve and dump SSH keys from GitHub.

Examples

Dump all keys from team devops in organization zeorg to /home/bob/.ssh/authorized_keys

$ github_pki -a /home/bob/.ssh/authorized_keys \
             -o "zeorg" -T "devops" \
             -t 398d6d326b546d70f9e1ef91abad1fc5ee0f1f39

Dump all keys from specified users as X509 public keys

$ github_pki -s /etc/software/ssl \
             -u bob -u alice \
             -t 398d6d326b546d70f9e1ef91abad1fc5ee0f1f39

Using docker

$ docker run -v $PWD/authorized_keys:/authorized_keys \
             -e GITHUB_TOKEN=398d6d326b546d70f9e1ef91abad1fc5ee0f1f39 \
             camptocamp/github_pki -u bob -u alice=jessie \
                -a /authorized_keys

Individual user format

Individual users (-u or GITHUB_USERS) can be passed in the following format:

Specify multiple users:

$ github_pki -u bob -u alice

Specify a different name on GitHub

GitHub user bob is called alice locally:

$ github_pki -u bob=alice

Specify a key ID to use

$ github_pki -u bob:1234

About

Use GitHub as a centralized repository of SSH keys

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Go 71.8%
  • Shell 11.9%
  • Roff 8.6%
  • Makefile 7.1%
  • Dockerfile 0.6%