From 70314f3570247ce9a62934997ea449ec44cd635b Mon Sep 17 00:00:00 2001 From: Bernhard Froehlich Date: Fri, 24 Feb 2017 15:27:09 +0000 Subject: [PATCH] Fix Repository support for Subversion 1.8.x where the output of svn info has changed. 1.7.22 svn: E170001: Unable to connect to a repository at URL 'https://svswdms02/dashboard' svn: E170001: OPTIONS of 'https://svswdms02/dashboard': authorization failed: Could not authenticate to server: rejected Digest challenge (https://svswdms02) 1.8.17 svn: E215004: Authentication failed and interactive prompting is disabled; see the --force-interactive option svn: E215004: Unable to connect to a repository at URL 'https://svswdms02/dashboard' svn: E215004: No more credentials or we tried too many times. Authentication failed --- src/Composer/Repository/Vcs/SvnDriver.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/Composer/Repository/Vcs/SvnDriver.php b/src/Composer/Repository/Vcs/SvnDriver.php index f2d6a4754..ffc7183f7 100644 --- a/src/Composer/Repository/Vcs/SvnDriver.php +++ b/src/Composer/Repository/Vcs/SvnDriver.php @@ -301,12 +301,20 @@ class SvnDriver extends VcsDriver return true; } + // Subversion client 1.7 and older if (false !== stripos($processExecutor->getErrorOutput(), 'authorization failed:')) { // This is likely a remote Subversion repository that requires // authentication. We will handle actual authentication later. return true; } + // Subversion client 1.8 and newer + if (false !== stripos($processExecutor->getErrorOutput(), 'Authentication failed')) { + // This is likely a remote Subversion or newer repository that requires + // authentication. We will handle actual authentication later. + return true; + } + return false; }