Fix bitbucket handling, fixes #9369
parent
04e5d725f4
commit
78797df5f8
|
@ -135,7 +135,7 @@ class Bitbucket
|
|||
$this->io->writeError($message);
|
||||
}
|
||||
|
||||
$url = 'https://confluence.atlassian.com/bitbucket/oauth-on-bitbucket-cloud-238027431.html';
|
||||
$url = 'https://support.atlassian.com/bitbucket-cloud/docs/use-oauth-on-bitbucket-cloud/';
|
||||
$this->io->writeError(sprintf('Follow the instructions on %s', $url));
|
||||
$this->io->writeError(sprintf('to create a consumer. It will be stored in "%s" for future use by Composer.', $this->config->getAuthConfigSource()->getName()));
|
||||
$this->io->writeError('Ensure you enter a "Callback URL" (http://example.com is fine) or it will not be possible to create an Access Token (this callback url will not be used by composer)');
|
||||
|
|
|
@ -699,8 +699,10 @@ class RemoteFilesystem
|
|||
) {
|
||||
throw new TransportException('Could not authenticate against '.$this->originUrl, 401);
|
||||
}
|
||||
} elseif ($this->config && $this->originUrl === 'bitbucket.org') {
|
||||
} elseif ($this->config && ($this->originUrl === 'bitbucket.org' || $this->originUrl === 'api.bitbucket.org')) {
|
||||
$askForOAuthToken = true;
|
||||
$this->originUrl = 'bitbucket.org';
|
||||
|
||||
if ($this->io->hasAuthentication($this->originUrl)) {
|
||||
$auth = $this->io->getAuthentication($this->originUrl);
|
||||
if ($auth['username'] !== 'x-token-auth') {
|
||||
|
|
Loading…
Reference in New Issue