<commit_before>sync-github-users-ssh-keys
==========================

Utility to synchronize public ssh keys for a github team with servers
<commit_msg>Add more details and how to<commit_after>sync-github-users-ssh-keys
==========================

Utility to synchronize public ssh keys for a github team with servers.
Basically, this utility generates the authorized_keys file that you
probably would like to distribute manually or through Chef/Puppet onto
your servers to allow SSH access for the Github team members.

REQUIREMENTS
============
Nodejs - Install it from [Here](https://nodejs.org)

INSTALL
=======

- ```npm install```

- Generate a Github Token from [Here](https://developer.github.com/v3/oauth_authorizations/#create-a-new-authorization) - (Use __Generate New Token__)

USAGE
=====

- List all teams within an org

```node sync.js --github-token TOKEN --org MY_GITHUB_ORG --list-teams [--debug]```

- Generate the authorized_keys file corresponding to the members of a single team

```node sync.js --github-token TOKEN --org MY_GITHUB_ORG --team-id
TEAM-ID --output PATH_TO_OUTPUT_FILE [--debug]```


EXAMPLES
========

- List Teams within the mozilla organization
```node sync.js --github-token TOKEN --org NewCorp --list-teams```

- Generate the authorized_keys file for team ABC in org NewCorp
```node sync.js --github-token TOKEN --team-id 801500 --org ifeelgoods --output authorized_keys

{'fraction_non_alphanumeric': 0.15003538570417552, 'fraction_numerical': 0.004953998584571833, 'mean_word_length': 4.45945945945946, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3152155', 'n_tokens_mistral': 440, 'n_tokens_neox': 401, 'n_words': 152}