소스 검색

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;