Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/cedricziel/dokku-deployment-keys
Provides a Dokku Plugin for injecting SSH deployment keys as well as injecting hostkeys to the container
https://github.com/cedricziel/dokku-deployment-keys
Last synced: 15 days ago
JSON representation
Provides a Dokku Plugin for injecting SSH deployment keys as well as injecting hostkeys to the container
- Host: GitHub
- URL: https://github.com/cedricziel/dokku-deployment-keys
- Owner: cedricziel
- License: mit
- Created: 2014-01-14T15:47:16.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2023-12-07T05:26:10.000Z (11 months ago)
- Last Synced: 2024-10-04T12:00:21.942Z (about 1 month ago)
- Language: Shell
- Size: 36.1 KB
- Stars: 57
- Watchers: 6
- Forks: 21
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
## SSH Deployment Keys Plugin for Dokku [![Build Status](https://img.shields.io/travis/cedricziel/dokku-deployment-plugin.svg?branch=master "Build Status")](https://travis-ci.org/cedricziel/dokku-deployment-plugin)
Provides a Dokku Plugin for injecting SSH deployment keys to the container.
This is useful if you hide your sourcecode in private repositories at VCS providers such as GitHub or Bitbucket.
## requirements
- dokku 0.4.0+
- docker 1.8.xOptionally, if you need host keys to be added, install the [host-keys plugin](https://github.com/cedricziel/dokku-hostkeys-plugin) as well.
## installation
```shell
# on 0.3.x
cd /var/lib/dokku/plugins
git clone https://github.com/cedricziel/dokku-deployment-keys.git deployment-keys
dokku plugins-install# on 0.4.x
dokku plugin:install https://github.com/cedricziel/dokku-deployment-keys.git deployment-keys
```## How does it work?
On installation, this plugin generates a pair of SSH Keys (rsa, 2048b). The key can be shown via the `deploymentkeys:show` command.
You can add this public key to your VCS Provider-which often allow read-only SSH keys to be added to a project for CI.The exact command used for the key generation is `ssh-keygen -q -t rsa -b 2048 -f "$shared_key_folder/id_rsa" -N ""`
The generated key at this point is a shared one, which means it is valid for any app on your Dokku host.
After generation, every subsequent container being built will get the shared key injected if it doesnt have its own pair.
## FAQ
**Q:** Can I replace it with an existing keypair?
**A:** Of course. But its a matter of lazyness. Every user-host combination should have its own keys so they can be revoked easily. Place existing ones in `$DOKKU_ROOT/.deployment-keys/shared/.ssh. Be careful with the permissions. `chmod 600` is mandatory for some ssh-executables and this is for a good reason!