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

main
Jordi Boggiano 4 years ago
parent 34fb609aad
commit 9d72c92f07
No known key found for this signature in database
GPG Key ID: 7BBD42C429EC80BC

@ -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);
}

Loading…
Cancel
Save