fetch-ssh-keys

command module
v1.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 28, 2017 License: Apache-2.0 Imports: 5 Imported by: 0

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> <output file>

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 ./the-keys

Tool can be used for example to automatically update .ssh/authorized_keys file by giving path to .ssh/authorized_keys as last argument and 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
Parameter Required Description
--format No (default ssh) Output format. Only ssh authorized_keys format supported for now
GitHub
Parameter Required Description
--organization Yes Name of the organization which members keys to pick
--team No Name of the team which members keys to pick
--token No GitHub API token to use for communication. Without token you get only public members of the organization.
--public-only No Return only members what are publicly members of the given organization

Development

Get dependencies
go get ./...
Run
go run main.go github --output ssh

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL