@ -259,7 +259,8 @@ class GitHubDriver extends VcsDriver
case 401:
case 401:
case 404:
case 404:
$this->isPrivate = true;
$this->isPrivate = true;
if (!$this->io->isInteractive()) {
try {
// If this repository may be private (hard to say for sure,
// If this repository may be private (hard to say for sure,
// GitHub returns 404 for private repositories) and we
// GitHub returns 404 for private repositories) and we
// cannot ask for authentication credentials (because we
// cannot ask for authentication credentials (because we
@ -274,6 +275,11 @@ class GitHubDriver extends VcsDriver
$this->gitDriver->initialize();
$this->gitDriver->initialize();
return;
return;
} catch (\RuntimeException $e) {
if (!$this->io->isInteractive()) {
$this->io->write('<error>Failed to clone the '.$this->generateSshUrl().' repository, try running in interactive mode so that you can enter your username and password</error>');