Fix edge case in bitbucket driver
parent
e54c7478ee
commit
9d3e3ca486
|
@ -163,7 +163,7 @@ abstract class BitbucketDriver extends VcsDriver
|
||||||
} catch (TransportException $e) {
|
} catch (TransportException $e) {
|
||||||
$bitbucketUtil = new Bitbucket($this->io, $this->config, $this->process, $this->remoteFilesystem);
|
$bitbucketUtil = new Bitbucket($this->io, $this->config, $this->process, $this->remoteFilesystem);
|
||||||
|
|
||||||
if (403 === $e->getCode()) {
|
if (403 === $e->getCode() || (401 === $e->getCode() && strpos($e->getMessage(), 'Could not authenticate against') === 0)) {
|
||||||
if (!$this->io->hasAuthentication($this->originUrl)
|
if (!$this->io->hasAuthentication($this->originUrl)
|
||||||
&& $bitbucketUtil->authorizeOAuth($this->originUrl)
|
&& $bitbucketUtil->authorizeOAuth($this->originUrl)
|
||||||
) {
|
) {
|
||||||
|
|
Loading…
Reference in New Issue