Skip to content
This repository has been archived by the owner on Sep 17, 2024. It is now read-only.

Use .ssh/config instead of ENV vars to store certificates #1

Open
akulisek opened this issue Jan 25, 2023 · 0 comments
Open

Use .ssh/config instead of ENV vars to store certificates #1

akulisek opened this issue Jan 25, 2023 · 0 comments

Comments

@akulisek
Copy link

akulisek commented Jan 25, 2023

Problem

Using ENV vars for storing deployment keys, in my opinion, is an approach that avoids standard practices and lacks clarity. Also, within the app itself (built on this pack) there are no traces of why we're doing this.

Suggested approach

As previousely discussed, this is a suggestion to use, in my view, a more appropriate and straightforward tooling for setting up multiple deployment keys.

Instead of storing them in ENV vars, I'd prefer adding them locally and bind them to specific subdomains for github repositories, for example:

Host repository1.github.com
  HostName github.com
  User git
  IdentityFile /home/johndoe/.ssh/github/repository1_github_deployment_key.id_rsa
  IdentitiesOnly yes

In any Rails application built on this pack we'd then have to update our Gemfile and set source for gems requiring access via these deployment keys.

Adding and maintaining an example .ssh/config showcasing setup for all gems requiring deployment keys access could then be used by anyone doing a fresh repo clone / setup on their machine.

I believe this greatly improves the readability, adds context behind the problem and almost self documents itself.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant