mirror of
https://github.com/andres-montanez/Magallanes
synced 2024-06-09 09:12:16 +02:00
Merge 100a125ac5
into b0d41af3ee
This commit is contained in:
commit
e7a4b82eed
|
@ -387,6 +387,16 @@ class Config
|
||||||
return $this->deployment('identity-file') ? ('-i ' . $this->deployment('identity-file') . ' ') : '';
|
return $this->deployment('identity-file') ? ('-i ' . $this->deployment('identity-file') . ' ') : '';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get UserKnownHostsFile & StrictHostKeyChecking options
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
public function getStrictHostCheckingOption()
|
||||||
|
{
|
||||||
|
return $this->general('ssh-strict-host-key-checking', true) ? '' : ' -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no ';
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the ConnectTimeout option
|
* Get the ConnectTimeout option
|
||||||
*
|
*
|
||||||
|
|
|
@ -197,7 +197,7 @@ abstract class AbstractTask
|
||||||
$needs_tty = ($this->getConfig()->general('ssh_needs_tty', false) ? '-t' : '');
|
$needs_tty = ($this->getConfig()->general('ssh_needs_tty', false) ? '-t' : '');
|
||||||
|
|
||||||
$localCommand = 'ssh ' . $this->getConfig()->getHostIdentityFileOption() . $needs_tty . ' -p ' . $this->getConfig()->getHostPort() . ' '
|
$localCommand = 'ssh ' . $this->getConfig()->getHostIdentityFileOption() . $needs_tty . ' -p ' . $this->getConfig()->getHostPort() . ' '
|
||||||
. '-q -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no '
|
. $this->getConfig()->getStrictHostCheckingOption()
|
||||||
. $this->getConfig()->getConnectTimeoutOption()
|
. $this->getConfig()->getConnectTimeoutOption()
|
||||||
. ($this->getConfig()->deployment('user') != '' ? $this->getConfig()->deployment('user') . '@' : '')
|
. ($this->getConfig()->deployment('user') != '' ? $this->getConfig()->deployment('user') . '@' : '')
|
||||||
. $this->getConfig()->getHostName();
|
. $this->getConfig()->getHostName();
|
||||||
|
|
|
@ -94,7 +94,7 @@ class TarGzTask extends BaseStrategyTaskAbstract implements IsReleaseAware
|
||||||
// Copy Tar Gz to Remote Host
|
// Copy Tar Gz to Remote Host
|
||||||
$command = 'scp ' . $strategyFlags . ' ' . $this->getConfig()->getHostIdentityFileOption()
|
$command = 'scp ' . $strategyFlags . ' ' . $this->getConfig()->getHostIdentityFileOption()
|
||||||
. $this->getConfig()->getConnectTimeoutOption() . '-P ' . $this->getConfig()->getHostPort()
|
. $this->getConfig()->getConnectTimeoutOption() . '-P ' . $this->getConfig()->getHostPort()
|
||||||
. " -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no "
|
. $this->getConfig()->getStrictHostCheckingOption()
|
||||||
. ' ' . $localTarGz . '.tar.gz '
|
. ' ' . $localTarGz . '.tar.gz '
|
||||||
. $this->getConfig()->deployment('user') . '@' . $this->getConfig()->getHostName() . ':'
|
. $this->getConfig()->deployment('user') . '@' . $this->getConfig()->getHostName() . ':'
|
||||||
. $deployToDirectory;
|
. $deployToDirectory;
|
||||||
|
|
Loading…
Reference in a new issue