浏览代码

Merge pull request #5553 from alcohol/fix-basic-auth-gitutil

check for additional possible authentication failure strings in gitutil
Jordi Boggiano 9 年之前
父节点
当前提交
8e2f5e741c
共有 1 个文件被更改,包括 6 次插入1 次删除
  1. 6 1
      src/Composer/Util/Git.php

+ 6 - 1
src/Composer/Util/Git.php

@@ -234,7 +234,12 @@ class Git
             return false;
         }
 
-        $authFailures = array('fatal: Authentication failed', 'remote error: Invalid username or password.');
+        $authFailures = array(
+            'fatal: Authentication failed',
+            'remote error: Invalid username or password.',
+            'error: 401 Unauthorized'
+        );
+
         foreach ($authFailures as $authFailure) {
             if (strpos($this->process->getErrorOutput(), $authFailure) !== false) {
                 return true;