kryptco / kr

DEPRECATED A dev tool for SSH auth + Git commit/tag signing using a key stored in Krypton.
https://krypt.co/developers/
Other
1.59k stars 109 forks source link

Remove SSH config when unpairing #294

Closed jspawar closed 2 years ago

jspawar commented 4 years ago

Hello Krypton folks,

Wanted to PR in a feature to remove the SSH config changes kr makes during the pair command. Motivation is to support shared machines with kr installed whose users are not all entirely using kr(i.e. when pair-programming with someone who does not want to use kr)

Given that the pair command always attempts to modify SSH config as kr desires, I figured it should be fine to remove the config on unpair command. This proposed change prevents modification to SSH config if opting out via the KR_SKIP_SSH_CONFIG env var.

Test I modified to drive out development isn't the cleanest I understand; however, I didn't want to make big refactoring decisions for those tests without some input from y'all first on whether or not this feature is something you'd be fine introducing. Would still of course love to hear any feedback and of course if there is any issue with this!

Thanks, Jwal