function Svn::doAuthDance
Repositories requests credentials, let's put them in.
Return value
Throws
\RuntimeException
1 call to Svn::doAuthDance()
- Svn::executeWithAuthRetry in vendor/
composer/ composer/ src/ Composer/ Util/ Svn.php
File
-
vendor/
composer/ composer/ src/ Composer/ Util/ Svn.php, line 190
Class
- Svn
- @author Till Klampaeckel <till@php.net> @author Jordi Boggiano <j.boggiano@seld.be>
Namespace
Composer\UtilCode
protected function doAuthDance() : Svn {
// cannot ask for credentials in non interactive mode
if (!$this->io
->isInteractive()) {
throw new \RuntimeException('can not ask for authentication in non interactive mode');
}
$this->io
->writeError("The Subversion server ({$this->url}) requested credentials:");
$this->hasAuth = true;
$this->credentials = [
'username' => (string) $this->io
->ask("Username: ", ''),
'password' => (string) $this->io
->askAndHideAnswer("Password: "),
];
$this->cacheCredentials = $this->io
->askConfirmation("Should Subversion cache these credentials? (yes/no) ");
return $this;
}