title: Composer install\update authentication fails
body: <p>When I'm trying to install dependency from my private repository, I'm getting the following error:</p>
  
  <pre><code>&gt; php.exe composer.phar update
  Loading composer repositories with package information
  
    [RuntimeException]                                                           
    Failed to clone https://my.stash.repo/scm/lib/my-super-lib.git, could no  
    t read packages from it                                                      
  
    fatal: Authentication failed for 'https://my.stash.repo/scm/lib/my-super-lib.git/'                                                                   
  
  update [--prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-dev] [--lock] [--no-plugins] [--no-custom-installers] [--no-scripts] [--no-progress] [--with-dependencies] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [packages1] ... [packagesN]
  
  Process finished with exit code 1 at 10:57:04.
  Execution time: 1 996 ms.
  </code></pre>
  
  <p>Relevant <code>composer.json</code> part looks as following:</p>
  
  <pre><code>   "require": {
          "php": "&gt;=5.3.0",
          "scaytrase/my-super-lib": "1.1"
      },
      "repositories": [
          {
              "type": "vcs",
              "url":  "https://my.stash.repo/scm/lib/my-super-lib.git"
          }
      ],
  </code></pre>
  
  <p>If I set username and password directly like</p>
  
  <pre><code>"url":  "https://username:password@my.stash.repo/scm/lib/my-super-lib.git"
  </code></pre>
  
  <p>composer operations work just fine. But I dont't want store plaintext credentials.</p>
  
  <p>Is there a way to make composer ask username and password each time?</p>
  
  <p>Repository is Atlassian Stash with https nginx in front of it (both https and http were tested)</p>
  
  <p><code>Composer version 70a20ebcc19f1ea8ab0954a4fbdce208b30085e7 2014-03-12 16:07:58</code></p>
  
  <p><strong>EDIT:</strong></p>
  
  <p>For now I perform <code>git clone --mirror</code> by myself to populate composer's cache and then I just run composer install or composer update as usual (but It says it cannot update package info sometimes)</p>
  
  <p><a href="https://github.com/composer/composer/blob/master/src/Composer/Repository/Vcs/GitDriver.php" rel="nofollow">code</a>:</p>
  
  <pre><code>            $command = sprintf('git clone --mirror %s %s', escapeshellarg($this-&gt;url), escapeshellarg($this-&gt;repoDir));
              if (0 !== $this-&gt;process-&gt;execute($command, $output)) {
                  $output = $this-&gt;process-&gt;getErrorOutput();
  
                  if (0 !== $this-&gt;process-&gt;execute('git --version', $ignoredOutput)) {
                      throw new \RuntimeException('Failed to clone '.$this-&gt;url.', git was not found, check that it is installed and in your PATH env.' . "\n\n" . $this-&gt;process-&gt;getErrorOutput());
                  }
  
                  throw new \RuntimeException('Failed to clone '.$this-&gt;url.', could not read packages from it' . "\n\n" .$output);
              }
  </code></pre>
  
  <p>manual <code>git clone --mirror</code> works just fine and asks for my credentials. But composer (which obviously executes the same command) - it does not.</p>
  
  <p><strong>EDIT2</strong></p>
  
  <p>It seems to be PHP Storm 8 EAP problem which i'm using. Latest stable version requires authentication correctly during <code>composer install</code>, but not during <code>composer update</code>.</p>