Git Product home page Git Product logo

rubygems-keychain's Introduction

Rubygems Keychain

Gem Version

Store Rubygems api keys and signing certificates securely in your macOS Keychain. Works with iCloud Keychain.

Warning: This gem is in active development and should not yet be considered stable

Installation

Install with Rubygems:

gem install rubygems-keychain --pre

Now you probably want to import your existing api keys:

gem keychain import

When you're ready, securely remove the old credentials file:

rm -P ~/.gem/credentials

You can always find your API key again on your rubygems.org profile.

Usage

This gem overrides the default api key get and set methods in Rubygems so should work transparently with all commands. For example:

$ gem owner mailcatcher
Enter your RubyGems.org credentials.
Don't have an account yet? Create one at https://rubygems.org/sign_up
   Email:   [email protected]
Password:   ********

Signed in.
Owners for gem: mailcatcher
- [email protected]

$ stat ~/.gem/credentials
stat: /Users/sj26/.gem/credentials: stat: No such file or directory

Import

You can import existing api keys from your credentials file using:

$ gem keychain import
Importing api keys from /Users/sj26/.gem/credentials:
 - rubygems (rubygems.org)
 - foo
 - https://gems.example.com

Optionally specify the path to a credentials file:

$ gem keychain import ~/Dropbox/.gem/credentials
Importing api keys from /Users/sj26/Dropbox/.gem/credentials:
 - ...

List

List the api keys stored in the Keychain by name/host:

$ gem keychain list
- rubygems (https://rubygems.org)
- foo
- https://gems.example.com

This will never output the actual keys, just their names.

Add

Add new api keys using gem keychain add:

$ gem keychain add
Name/host:  foo
API Key:  ๐Ÿ”‘
INFO:  Successfully added key for 'foo'

You can specify the name and optionally the key on the command line if you like, but that is less secure:

$ gem keychain add foo abc123
INFO:  Successfully added key for 'foo'

To add an api key for rubygems.org use rubygems as the name.

Remove

Remove api keys using gem keychain rm:

$ gem keychain rm
Which api key do you want to remove?
 1. rubygems (rubygems.org)
 2. foo
> 2
Are you sure you want to remove the api key 'foo'? [yN]  y
INFO:  Successfully removed api key 'foo'

You can specify the api key name on the command line, and force removal if you wish:

$ gem keychain rm --force foo
INFO:  Successfully removed api key 'foo'

Coming Soon

  • Certificate management for signing gems

Known Issues

Development

After checking out the repo, run bin/setup to install dependencies. Then, run rake spec to run the tests. You can also run bin/console for an interactive prompt that will allow you to experiment. Test rubygems plugin integration with bundle exec gem ... which will load the plugin from the current directory.

To install this gem onto your local machine, run bundle exec rake install. To release a new version, update the version number in version.rb, and then run bundle exec rake release, which will create a git tag for the version, push git commits and tags, and push the .gem file to rubygems.org.

The helper tool is written in Swift and needs to be code signed correctly for iCloud Keychain to work. At the moment this is only possible by the primary author.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/sj26/rubygems-keychain.

License

The gem is available as open source under the terms of the MIT License.

rubygems-keychain's People

Contributors

dependabot[bot] avatar sj26 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

rubygems-keychain's Issues

gpg-keychain integration, anyone?

Hey SJ26, I'm curious if you'd accept a pull request integrating ueno/ruby-gpgme as a dependency for keychain integration for those of us who might not have an apple keychain software handy?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.