Project

sandman

0.0
No commit activity in last 3 years
No release in over 3 years
Sandman is a gem aimed at helping you manage your SSH keys between GitHub and Bitbucket
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.3
>= 0

Runtime

 Project Readme

Sandman

Sandman is meant to help manage ssh keys on GitHub and BitBucket.

Table of Contents

  • Installation
  • Usage
    • Setup
    • Adding keys
    • Removing keys
    • Viewing keys
  • TODO
  • Contributing

Generated with tocify

Installation

Add this line to your application's Gemfile:

gem 'sandman'

And then execute:

$ bundle

Or install it yourself as:

$ gem install sandman

Usage

Sandman is generally meant to be used from the command line, though I guess you could use it through a script if you want.

Setup

To allow access to your GitHub and BitBucket accounts, you'll need to create a YAML formatted config file at ~/.sandman. Sample config shown below:

---
:accounts:
- :login: pyro2927
  :password: PASSWORD1
  :type: Github
- :login: pyro2927
  :password: LULZPASSWORD
  :type: BitBucket

You can create a sample config by running sandman createconfig.

Adding keys

Sandman can add keys pasted into the terminal, though it can also read them from a file. The name isn't required, though if you don't input one it will use the system's hostname.

$ sandman add "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC3d5LXLEAOQBVooFVAxWHsolr..." awesomekey
$ sandman add ~/.ssh/id_rsa.pub

Removing keys

Removing keys is just about as easy. To remove a key, you must pass in a string it starts with, or the name/title of the key.

$ sandman rem "ssh-rsa AAAAB3NzaC1yc2E"
$ sandman rem oldkey

Warning: This checks against the starting text of your public key. If you run sandman rem ssh, it will remove all of them.

Viewing keys

Viewing keys will show your existing keys in any authenticated systems. By default, keys will be truncated to prevent wrapping in the terminal, though they can be printed fully with showfull.

$ sandman show
$ sandman showfull

TODO

  • Enable public key marging, syncing all accounts specified
  • Allow arbitrary config file location
  • Support OAuth
  • Add in safeguards to prevent people from deleting all of their public keys
  • Fix crazy nokogiri conflicts between dependancies

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request