|
|
|
@ -390,7 +390,7 @@ class GitBitbucketDriver extends VcsDriver
|
|
|
|
|
} catch (TransportException $e) {
|
|
|
|
|
$bitbucketUtil = new Bitbucket($this->io, $this->config, $this->process, $this->httpDownloader);
|
|
|
|
|
|
|
|
|
|
if (403 === $e->getCode() || (401 === $e->getCode() && strpos($e->getMessage(), 'Could not authenticate against') === 0)) {
|
|
|
|
|
if (in_array($e->getCode(), array(403, 404), true) || (401 === $e->getCode() && strpos($e->getMessage(), 'Could not authenticate against') === 0)) {
|
|
|
|
|
if (!$this->io->hasAuthentication($this->originUrl)
|
|
|
|
|
&& $bitbucketUtil->authorizeOAuth($this->originUrl)
|
|
|
|
|
) {
|
|
|
|
|