namespace Cubist\Util\CommandLine;
use Cubist\Net\Transfer\IServer;
+use Cubist\Util\Files\Files;
class LocalToGCSRclone extends CloneProgram
{
protected function _preExecute()
{
parent::_preExecute();
+ $tmp = Files::tempnam();
+ file_put_contents($tmp, $this->getGCSServiceAccountKey());
$this->setArg(null, $this->getMirror() ? 'sync' : 'copy');
$this->setArg(null, $this->getSrc());
- $this->setArg('gcs-service-account-credentials', $this->getGCSServiceAccountKey());
+ $this->setArg('gcs-service-account-file', $tmp);
+ $this->setArg('gcs-bucket-policy-only');
if ($this->isDryRun()) {
$this->setArg('dry-run');