diff --git a/src/Composer/IO/BaseIO.php b/src/Composer/IO/BaseIO.php index f391f8968..0a787029c 100644 --- a/src/Composer/IO/BaseIO.php +++ b/src/Composer/IO/BaseIO.php @@ -65,6 +65,11 @@ abstract class BaseIO implements IOInterface protected function checkAndSetAuthentication($repositoryName, $username, $password = null) { if ($this->hasAuthentication($repositoryName)) { + $auth = $this->getAuthentication($repositoryName); + if ($auth['username'] === $username && $auth['password'] === $password) { + return; + } + $this->writeError( sprintf( "Warning: You should avoid overwriting already defined auth settings for %s.",