Forráskód Böngészése

Avoid looping endlessly for invalid GitLab tokens in git config, fixes #8667

Jordi Boggiano 5 éve
szülő
commit
9d72c92f07
1 módosított fájl, 1 hozzáadás és 1 törlés
  1. 1 1
      src/Composer/Util/RemoteFilesystem.php

+ 1 - 1
src/Composer/Util/RemoteFilesystem.php

@@ -690,7 +690,7 @@ class RemoteFilesystem
             $message = "\n".'Could not fetch '.$this->fileUrl.', enter your ' . $this->originUrl . ' credentials ' .($httpStatus === 401 ? 'to access private repos' : 'to go over the API rate limit');
             $gitLabUtil = new GitLab($this->io, $this->config, null);
 
-            if ($this->io->hasAuthentication($this->originUrl) && ($auth = $this->io->getAuthentication($this->originUrl)) && in_array($auth['password'], array('gitlab-ci-token', 'private-token'), true)) {
+            if ($this->io->hasAuthentication($this->originUrl) && ($auth = $this->io->getAuthentication($this->originUrl)) && in_array($auth['password'], array('gitlab-ci-token', 'private-token', 'oauth2'), true)) {
                 throw new TransportException("Invalid credentials for '" . $this->fileUrl . "', aborting.", $httpStatus);
             }