composer/composer · error · RuntimeException
{name} could not be downloaded, {error}
Error message
{name} could not be downloaded, {error} What it means
Thrown by SvnDownloader::execute() (line 119-125) wrapping any RuntimeException from SvnUtil::execute() during svn co/switch. It prefixes the package pretty name and re-throws with the underlying svn error message, covering authentication, network, and repository-access failures.
Source
Thrown at src/Composer/Downloader/SvnDownloader.php:122
/**
* Execute an SVN command and try to fix up the process with credentials
* if necessary.
*
* @param string $baseUrl Base URL of the repository
* @param non-empty-list<string> $command SVN command to run
* @param string $url SVN url
* @param string $cwd Working directory
* @param string $path Target for a checkout
* @throws \RuntimeException
*/
protected function execute(PackageInterface $package, string $baseUrl, array $command, string $url, ?string $cwd = null, ?string $path = null): string
{
$util = new SvnUtil($baseUrl, $this->io, $this->config, $this->process);
$util->setCacheCredentials($this->cacheCredentials);
try {
return $util->execute($command, $url, $cwd, $path, $this->io->isVerbose());
} catch (\RuntimeException $e) {
throw new \RuntimeException(
$package->getPrettyName().' could not be downloaded, '.$e->getMessage()
);
}
}
/**
* @inheritDoc
*/
protected function cleanChanges(PackageInterface $package, string $path, bool $update): PromiseInterface
{
if (null === ($changes = $this->getLocalChanges($package, $path))) {
return \React\Promise\resolve(null);
}
if (!$this->io->isInteractive()) {
if (true === $this->config->get('discard-changes')) {
return $this->discardChanges($path);
}View on GitHub (pinned to 6ffc117740)
Solutions
- Cache valid SVN credentials or provide them interactively (run svn ls <url> manually to authenticate)
- Verify network/VPN connectivity to the SVN server from the environment
- Confirm the repository url and path are correct and accessible
- Check svn-cache-credentials repository setting if credential caching is the issue
Example fix
# authenticate and cache credentials once svn ls https://svn.example.com/repo --username me # then re-run composer update
Defensive patterns
Strategy: try-catch
Try / catch
try {
$downloader->download($package, $path);
} catch (\RuntimeException $e) {
if (str_contains($e->getMessage(), 'could not be downloaded')) {
// surface credential/network guidance; optionally prompt for svn creds and retry
handleSvnAccessFailure($package, $e);
} else { throw $e; }
} Prevention
- Cache SVN credentials once via 'svn ls <url>' before running composer
- Ensure VPN/network connectivity to the SVN server in CI
- Verify repository urls and access permissions in the repository definition
When it happens
Trigger: execute() calls $util->execute($command, $url, ...) for an svn checkout/switch and the underlying util throws — bad credentials, unreachable host, forbidden path, or a malformed svn url.
Common situations: SVN credentials not cached/wrong; repository behind a VPN/firewall that is not connected; svn url typo; server-side permission denial.
Related errors
- Repository ${url} could not be processed, ${message}
- Failed to execute {imploded command} {runtime exception mes
- Failed to clone ${url} to repository ${repoFile} ${output}
- {fullOutput}
- wrong credentials provided ({fullOutput})
AI-assisted analysis of composer/composer@6ffc117740 (2026-08-07).
Data as JSON: /api/errors/b170876af61e6711.
Report an issue: GitHub.