protected function cloneBySsh(Builder $builder, $cloneTo)
    {
        $keyFile = $this->writeSshKey();

        // Do the git clone:
        $cmd = 'hg clone --ssh "ssh -i '.$keyFile.'" %s "%s"';
        $success = $builder->executeCommand($cmd, $this->getCloneUrl(), $cloneTo);

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

        // Remove the key file:
        unlink($keyFile);
        return $success;
    }