File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -75,6 +75,7 @@ nixOptions=(
75
75
--extra-experimental-features ' nix-command flakes'
76
76
" --no-write-lock-file"
77
77
)
78
+ SSH_PRIVATE_KEY=${SSH_PRIVATE_KEY-}
78
79
79
80
declare -A phases
80
81
phases[kexec]=1
319
320
abort " flake must be set"
320
321
fi
321
322
322
- # overrides -i if passed as an env var
323
- if [[ -n ${SSH_PRIVATE_KEY-} ]]; then
323
+ if [[ -n ${SSH_PRIVATE_KEY} ]] && [[ -z ${sshPrivateKeyFile-} ]]; then
324
324
# $ssh_key_dir is getting deleted on trap EXIT
325
325
sshPrivateKeyFile=" $ssh_key_dir /from-env"
326
326
(
@@ -329,10 +329,9 @@ if [[ -n ${SSH_PRIVATE_KEY-} ]]; then
329
329
)
330
330
fi
331
331
332
- if [[ -n ${sshPrivateKeyFile- } ]]; then
332
+ if [[ -n ${sshPrivateKeyFile} ]]; then
333
333
unset SSH_AUTH_SOCK # don't use system agent if key was supplied
334
- sshCopyIdArgs+=(-o " IdentityFile=${sshPrivateKeyFile} " )
335
- sshCopyIdArgs+=(-f)
334
+ sshCopyIdArgs+=(-o " IdentityFile=${sshPrivateKeyFile} " -f)
336
335
fi
337
336
338
337
sshSettings=$( ssh " ${sshArgs[@]} " -G " ${sshConnection} " )
You can’t perform that action at this time.
0 commit comments