|
@@ -52,6 +52,11 @@ class GitHubDriver extends VcsDriver
|
|
|
$this->originUrl = !empty($match[1]) ? $match[1] : $match[2];
|
|
|
$this->cache = new Cache($this->io, $this->config->get('cache-repo-dir').'/'.$this->originUrl.'/'.$this->owner.'/'.$this->repository);
|
|
|
|
|
|
+ if (isset($this->repoConfig['no-api']) && $this->repoConfig['no-api']) {
|
|
|
+ $this->setupGitDriver();
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
$this->fetchRootIdentifier();
|
|
|
}
|
|
|
|
|
@@ -405,14 +410,7 @@ class GitHubDriver extends VcsDriver
|
|
|
// GitHub returns 404 for private repositories) and we
|
|
|
// cannot ask for authentication credentials (because we
|
|
|
// are not interactive) then we fallback to GitDriver.
|
|
|
- $this->gitDriver = new GitDriver(
|
|
|
- array('url' => $this->generateSshUrl()),
|
|
|
- $this->io,
|
|
|
- $this->config,
|
|
|
- $this->process,
|
|
|
- $this->remoteFilesystem
|
|
|
- );
|
|
|
- $this->gitDriver->initialize();
|
|
|
+ $this->setupGitDriver();
|
|
|
|
|
|
return;
|
|
|
} catch (\RuntimeException $e) {
|
|
@@ -422,4 +420,16 @@ class GitHubDriver extends VcsDriver
|
|
|
throw $e;
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ protected function setupGitDriver()
|
|
|
+ {
|
|
|
+ $this->gitDriver = new GitDriver(
|
|
|
+ array('url' => $this->generateSshUrl()),
|
|
|
+ $this->io,
|
|
|
+ $this->config,
|
|
|
+ $this->process,
|
|
|
+ $this->remoteFilesystem
|
|
|
+ );
|
|
|
+ $this->gitDriver->initialize();
|
|
|
+ }
|
|
|
}
|