protected function cloneBySsh(Builder $builder, $cloneTo)
    {
        // Do the git clone:
        $cmd   = 'git clone --recursive ';
        $depth = $builder->getConfig('clone_depth');
        if (!is_null($depth)) {
            $cmd .= ' --depth ' . intval($depth) . ' ';
        }

        $cmd .= ' -b "%s" "%s" "%s"';

        $success = $this->runBySsh($builder, $cloneTo, $cmd, [$this->getBranch(), $this->getCloneUrl(), $cloneTo]);

        if ($success) {
            $success = $this->postCloneSetup($builder, $cloneTo);
        }

        return $success;
    }