github-ssh-keys

0.1.2 • Public • Published

github-ssh-keys

fetch ssh keys from github for a given username

Build Status Dependency Status

Usage (cli)

Use github-ssh-keys to fetch users ssh public keys from github.

$ github-ssh-keys flootr meaku

--format

If you use the --format flag you are able to auto format keys to fit in a authorized-keys file.

$ github-ssh-keys --format flootr meaku jhnns >> authorized_keys

Library (API)

var fetchKeys = require('git-fetch-ssh');
var username = 'flootr';
 
fetchKeys(username)
    .then(console.log)
    .catch(console.error);

Or, if you want to fetch the keys for more than one user.

var users = ['jhnns', 'meaku', 'topa', 'matthaias', 'sbat', 'flootr'];
 
Promise.all(users.map(fetchKeys))
    .then(console.log)
    .catch(console.error);

/github-ssh-keys/

    Package Sidebar

    Install

    npm i github-ssh-keys

    Weekly Downloads

    3

    Version

    0.1.2

    License

    MIT

    Last publish

    Collaborators

    • hpohlmeyer
    • thois
    • jhnns
    • meaku
    • peeri
    • matthaias
    • leomelzer
    • antosan
    • moritzjacobs