Browse Source

[#202] Remove inconsistency in ssh options

Add UserKnownHostsFile and StrictHostKeyChecking to scp command in TarGz strategy.
1.0
Jakub Turek 10 years ago
parent
commit
5a1f2502d2
  1. 8
      Mage/Task/BuiltIn/Deployment/Strategy/TarGzTask.php

8
Mage/Task/BuiltIn/Deployment/Strategy/TarGzTask.php

@ -92,8 +92,12 @@ class TarGzTask extends BaseStrategyTaskAbstract implements IsReleaseAware
}
// Copy Tar Gz to Remote Host
$command = 'scp ' . $strategyFlags . ' ' . $this->getConfig()->getHostIdentityFileOption() . $this->getConfig()->getConnectTimeoutOption() . '-P ' . $this->getConfig()->getHostPort() . ' ' . $localTarGz . '.tar.gz '
. $this->getConfig()->deployment('user') . '@' . $this->getConfig()->getHostName() . ':' . $deployToDirectory;
$command = 'scp ' . $strategyFlags . ' ' . $this->getConfig()->getHostIdentityFileOption()
. $this->getConfig()->getConnectTimeoutOption() . '-P ' . $this->getConfig()->getHostPort()
. " -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no "
. ' ' . $localTarGz . '.tar.gz '
. $this->getConfig()->deployment('user') . '@' . $this->getConfig()->getHostName() . ':'
. $deployToDirectory;
$result = $this->runCommandLocal($command) && $result;
// Strategy Flags

Loading…
Cancel
Save