From edfaf727e57b1616579c99a26b4f2edaa3ff0d5a Mon Sep 17 00:00:00 2001 From: Nils Adermann Date: Tue, 25 Feb 2014 15:55:44 +0100 Subject: [PATCH] When using the github driver with no-api don't reset to an ssh url --- src/Composer/Repository/Vcs/GitHubDriver.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Composer/Repository/Vcs/GitHubDriver.php b/src/Composer/Repository/Vcs/GitHubDriver.php index 60f343ab2..c99c8cf18 100644 --- a/src/Composer/Repository/Vcs/GitHubDriver.php +++ b/src/Composer/Repository/Vcs/GitHubDriver.php @@ -53,7 +53,7 @@ class GitHubDriver extends VcsDriver $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(); + $this->setupGitDriver($this->getUrl()); return; } @@ -406,7 +406,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->setupGitDriver(); + $this->setupGitDriver($this->generateSshUrl()); return; } catch (\RuntimeException $e) { @@ -417,10 +417,10 @@ class GitHubDriver extends VcsDriver } } - protected function setupGitDriver() + protected function setupGitDriver($url) { $this->gitDriver = new GitDriver( - array('url' => $this->generateSshUrl()), + array('url' => $url), $this->io, $this->config, $this->process,