diff options
| -rw-r--r-- | deploy.ps1 | 5 | ||||
| -rw-r--r-- | doc/Design.md | 2 |
2 files changed, 4 insertions, 3 deletions
@@ -10,7 +10,7 @@ $deploymentSucceeded = $false $failureMessage = $null $locationPushed = $false $nativeCommands = @{} -$sshOptions = @("-o", "BatchMode=yes", "-o", "ConnectTimeout=10") +$sshOptions = @("-o", "ConnectTimeout=10") function Get-NativeCommandPath { param( @@ -298,7 +298,8 @@ finally { $null -ne $remoteArchive ) { $cleanupCommand = "rm -f -- '$remoteArchive'" - & $nativeCommands["ssh"] @sshOptions $remoteTarget $cleanupCommand 2>$null | Out-Null + $cleanupSshOptions = @($sshOptions) + @("-o", "BatchMode=yes") + & $nativeCommands["ssh"] @cleanupSshOptions $remoteTarget $cleanupCommand 2>$null | Out-Null } } diff --git a/doc/Design.md b/doc/Design.md index 0b2d443..26fc64c 100644 --- a/doc/Design.md +++ b/doc/Design.md @@ -498,7 +498,7 @@ Markdownの @/ 内部リンク |---|---| | 設定読込 | rootの`deploy.config.psd1`を`Import-PowerShellDataFile`で自動読込する。command line引数は使用しない。 | | 接続 | 設定内の`DeployHost`と`DeployUser`をWindows OpenSSHの`ssh`/`scp`へ渡す。 | -| 認証 | `IdentityFile`が空ならOpenSSH標準key探索を使用し、値があれば指定fileを使用する。 | +| 認証 | `IdentityFile`が空ならOpenSSH標準key探索を使用し、値があれば指定fileを使用する。秘密鍵のpassphraseは`scp`/`ssh`が対話入力を求め、fileへ保存しない。失敗時cleanupだけは`BatchMode=yes`で入力待ちを防ぐ。 | | Remote base | 設定内の`RemoteBase`を使用し、誤操作防止のため`/srv/www/`配下だけを許可する。 | | 転送単位 | `public/`の中身だけを含む一時`tar.gz`。 | | Release ID | ローカル時刻の`yyyyMMdd-HHmmss`。 | |
