Skip to content

Commit

Permalink
Fix Repository support for Subversion 1.8.x where the output of svn info
Browse files Browse the repository at this point in the history
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
  • Loading branch information
decke authored and Seldaek committed Mar 6, 2017
1 parent c0b03d0 commit 70314f3
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/Composer/Repository/Vcs/SvnDriver.php
Expand Up @@ -301,12 +301,20 @@ public static function supports(IOInterface $io, Config $config, $url, $deep = f
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;
}

Expand Down

0 comments on commit 70314f3

Please sign in to comment.