An open API service indexing awesome lists of open source software.

https://github.com/peerigon/github-ssh-keys

Fetch SSH keys from GitHub for given usernames. Optionally save them to `authorized_keys`.
https://github.com/peerigon/github-ssh-keys

Last synced: 11 months ago
JSON representation

Fetch SSH keys from GitHub for given usernames. Optionally save them to `authorized_keys`.

Awesome Lists containing this project

README

          

# github-ssh-keys

fetch ssh keys from github for a given username

[![Build Status](https://travis-ci.org/peerigon/github-ssh-keys.svg)](https://travis-ci.org/peerigon/github-ssh-keys) [![Dependency Status](https://david-dm.org/peerigon/github-ssh-keys.svg)](https://david-dm.org/peerigon/github-ssh-keys)

## Usage (cli)

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

```bash
$ 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.

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

## Library (API)

```javascript
var fetchKeys = require("github-ssh-keys");
var username = "flootr";

fetchKeys(username).then(console.log).catch(console.error);
```

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

```javascript
var users = ["jhnns", "meaku", "topa", "matthaias", "sbat", "flootr"];

Promise.all(users.map(fetchKeys)).then(console.log).catch(console.error);
```

---

## License

MIT

## Sponsors

[](https://peerigon.com)