Categorygithub.com/ernoaapa/fetch-ssh-keys
modulepackage
0.0.2
Repository: https://github.com/ernoaapa/fetch-ssh-keys.git
Documentation: pkg.go.dev

# README

fetch-ssh-keys

fetch-ssh-keys is small shell command to get users public SSH keys from different cloud services like GitHub.

Note: Tested only on Linux and Mac. If you test on any other platform, please me know!

Usage

fetch-ssh-keys <source name> <parameters>

For example fetch users public SSH keys from GitHub my-lovely-team team in my-awesome-company organization and output in SSH authorized_keys format

fetch-ssh-keys github --organization my-awesome-company --team my-lovely-team --token YOUR-TOKEN-HERE

Tool can be used for example to automatically update .ssh/authorized_keys file by adding the script to cron job.

Installation

  • Download binary from releases
  • Give execution rights (chmod +x fetch-ssh-keys) and add it into your $PATH

Configuration

ParameterRequiredDescription
--outputYesOutput format. Only ssh authorized_keys format supported for now

GitHub

ParameterRequiredDescription
--organizationYesName of the organization which members keys to pick
--teamNoName of the team which members keys to pick
--tokenNoGitHub API token to use for communication. Without token you get only public members of the organization.
--public-onlyNoReturn only members what are publicly members of the given organization

Development

Get dependencies

go get ./...

Run stastd-exec

go run main.go github --output ssh

# Packages

No description provided by the author
No description provided by the author

# Structs

StatsdConfig for statsd client.