No release in over a year
Sync Github organisation public SSH keys to `server authorized_keys` file
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 0
>= 0

Runtime

>= 2.3.0
 Project Readme

Capistrano Cloudwatch Build Status Gem Version

Sync organisation SSH public keys to server authorized_keys file so they are able to SSH into OS - for Capistrano v3.

Note: The authorized keys file is generated locally before being uploaded to the server(s).

Installation

Add this line to your application's Gemfile:

gem 'capistrano-ssh-authorized-keys-github', require: false

And then execute:

$ bundle

Or install it yourself as:

$ gem install capistrano-ssh-authorized-keys-github

Usage

Require the gem in your Capfile:

require 'capistrano/ssh-authorized-keys-github'

And then set the variables in config/deploy.rb:

set :github_org, 'olioex'
# ...or... (takes priority)
set :github_orgs, ['olioex', 'github']
# Optional for Github rate limits (oauth application)
set :github_app_id, '12345'
set :github_app_secret, 'abcdef'

The task will run automatically on successful deploy. Alternatively, you can notify of a deploy starting manually by using:

bundle exec cap production security:sync_ssh_keys

Notes

Users in your organisation will need to have their membership public in order for SSH public keys to be sync'd to the server.

Github rate limits aren't currently respected. They are limited to 60 per hour. if you have a large number of users and are doing regular syncing from an IP address then you will be rate limited.

Copyright

Copyright (c) 2022 OLIO Exchange Ltd. See LICENSE.txt for further details.