SSH key for github on File editor configurator add-on

@adamgreg
I’m trying to use the SSH keys to push to github. I’ve copied my id_rsa to /config/.ssh and that’s my config :

dirsfirst: false
enforce_basepath: false
git: true
ignore_pattern:
  - __pycache__
  - .cloud
  - .storage
  - deps
ssh_keys:
  - /config/.ssh/id_rsa

But now the add-on is stuck because is waiting for the passphrase, which I cannot enter. What am I missing?

[17:44:07] INFO: Starting SSH agent
Agent pid 212
[17:44:07] INFO: Adding SSH private key file "/config/.ssh/id_rsa"
[cont-finish.d] executing container finish scripts...
[cont-finish.d] done.
[s6-finish] waiting for services.
[s6-finish] sending all processes the TERM signal.
[s6-finish] sending all processes the KILL signal and exiting.
Enter passphrase for /config/.ssh/id_rsa: 

It’s possible to remove the encryption from a private key: https://haythamsalhi.wordpress.com/2018/07/04/remove-private-key-password-using-openssl/

Obviously this makes things less secure. But since the addon-startup is not interactive, there’s no way around that.

+1 agreed - that is what I would do, regrettably.

1 Like

I’ve solved removing the passphrase :frowning: using the following procedure:

  1. I’ve started the file editor add-on without the SSH key parameter in the config
  2. using Execute shell command I’ve removed the passphrase ssh-keygen -p -P oldpassphrase -N "" -f /config/.ssh/id_rsa
  3. added the key in the config
ssh_keys:
  - /config/.ssh/id_rsa
  1. restarted the add-on