diff options
author | Christopher Baines <mail@cbaines.net> | 2018-06-24 11:11:49 +0100 |
---|---|---|
committer | Christopher Baines <mail@cbaines.net> | 2018-06-24 11:11:49 +0100 |
commit | ac45ed064b096f715805d21638ee9286804d12ef (patch) | |
tree | bd0390124a0229d438668c4ae290f2a03ce88047 /app/services | |
parent | 3e3e975df56e6048594b1eaaed5ddbeab80918fb (diff) | |
download | govuk-mini-environment-admin-ac45ed064b096f715805d21638ee9286804d12ef.tar govuk-mini-environment-admin-ac45ed064b096f715805d21638ee9286804d12ef.tar.gz |
Neaten up SSH handling
Explicitly use the specified private key where possible. Also, use a
struct for the user, address and private key.
Diffstat (limited to 'app/services')
-rw-r--r-- | app/services/govuk_guix/build_mini_environment.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/app/services/govuk_guix/build_mini_environment.rb b/app/services/govuk_guix/build_mini_environment.rb index a0361b0..8e2d912 100644 --- a/app/services/govuk_guix/build_mini_environment.rb +++ b/app/services/govuk_guix/build_mini_environment.rb @@ -37,12 +37,16 @@ module GovukGuix::BuildMiniEnvironment remote_host = options[:run_remotely_on_host] if remote_host && Guix.available_locally? + # TODO: This doesn't use the private key specified by the + # backend, so it'll only work when the default SSH key has + # access to the remote host. + # Copy the revision to the remote host, to ensure it's available # there run_command( 'guix', 'copy', - "--to=#{remote_host}", + "--to=#{remote_host.user_at_address}", mini_environment.govuk_guix_revision.store_path ) end |