Fix CS
parent
a10bffec0e
commit
020c126c27
|
@ -19,6 +19,7 @@ use Composer\Json\JsonFile;
|
|||
use Composer\Downloader\TransportException;
|
||||
use Composer\Util\RemoteFilesystem;
|
||||
use Composer\Util\GitLab;
|
||||
|
||||
/**
|
||||
* Driver for GitLab API, use the Git driver for local checkouts.
|
||||
*
|
||||
|
@ -260,7 +261,6 @@ class GitLabDriver extends VcsDriver
|
|||
|
||||
protected function attemptCloneFallback()
|
||||
{
|
||||
|
||||
try {
|
||||
// If this repository may be private and we
|
||||
// cannot ask for authentication credentials (because we
|
||||
|
|
|
@ -88,7 +88,6 @@ class Git
|
|||
if ($bypassSshForGitHub || 0 !== $this->process->execute($command, $ignoredOutput, $cwd)) {
|
||||
// private github repository without git access, try https with auth
|
||||
if (preg_match('{^git@'.self::getGitHubDomainsRegex($this->config).':(.+?)\.git$}i', $url, $match)) {
|
||||
|
||||
if (!$this->io->hasAuthentication($match[1])) {
|
||||
$gitHubUtil = new GitHub($this->io, $this->config, $this->process);
|
||||
$message = 'Cloning failed using an ssh key for authentication, enter your GitHub credentials to access private repos';
|
||||
|
|
|
@ -3,8 +3,8 @@
|
|||
/*
|
||||
* This file is part of Composer.
|
||||
*
|
||||
* (c) Roshan Gautam <roshan.gautam@hotmail.com>
|
||||
*
|
||||
* (c) Nils Adermann <naderman@naderman.de>
|
||||
* Jordi Boggiano <j.boggiano@seld.be>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
|
|
|
@ -488,7 +488,7 @@ class RemoteFilesystem
|
|||
if ('github.com' === $originUrl && 'x-oauth-basic' === $auth['password']) {
|
||||
$options['github-token'] = $auth['username'];
|
||||
} elseif ($this->config && in_array($originUrl, $this->config->get('gitlab-domains'), true)) {
|
||||
if($auth['password'] === 'oauth2') {
|
||||
if ($auth['password'] === 'oauth2') {
|
||||
$headers[] = 'Authorization: Bearer '.$auth['username'];
|
||||
}
|
||||
} else {
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of Composer.
|
||||
*
|
||||
* (c) Nils Adermann <naderman@naderman.de>
|
||||
* Jordi Boggiano <j.boggiano@seld.be>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
* This file is part of Composer.
|
||||
*
|
||||
* (c) Nils Adermann <naderman@naderman.de>
|
||||
* Jordi Boggiano <j.boggiano@seld.be>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Composer\Test\Util;
|
||||
|
||||
|
|
Loading…
Reference in New Issue