title: How to use a specific tag/version with composer and a private git repository?
body: <p>I've got some packages host on the Gitlab of my company. I want to request a specific version of these packages but each time I try, composer download the latest commit of the master branch.</p>
  <p>composer.json :</p>
  <pre><code>{
     &quot;name&quot; : &quot;MyProject&quot;,
     &quot;require&quot; : {
        &quot;user/project&quot; : &quot;v0.5.0&quot;
     },
     &quot;type&quot; : &quot;project&quot;,
     &quot;repositories&quot; : [
        {
           &quot;url&quot; : &quot;git@gitlab.XXXX.fr:user/project.git&quot;,
           &quot;type&quot; : &quot;vcs&quot;
        }
     ],
     &quot;config&quot; : {
        &quot;vendor-dir&quot; : &quot;private/class&quot;
     }
  }
  </code></pre>
  <p>The structure of the repository of my package :</p>
  <ul>
  <li>tag v0.5.0 : commit dd6ed3c8...</li>
  <li>commit X,Y,Z</li>
  <li>tag v0.7.0 : commit 15293ac6...</li>
  <li>last commit f15600a1...</li>
  </ul>
  <p>When I execute &quot;composer install&quot; :</p>
  <blockquote>
  <p>Loading composer repositories with package information</p>
  <p>Installing dependencies (including require-dev)</p>
  <p>Analyzed 69 packages to resolve dependencies</p>
  <p>Analyzed 67 rules to resolve dependencies</p>
  <ul>
  <li><p>Installing user/project (dev-master f15600a)</p>
  <p>Cloning f15600a1</p>
  </li>
  </ul>
  </blockquote>
  <p>It downloads the last commit only.</p>
  <p>How can I configure the composer.json file of my project to use a specific tag ?</p>