Unable to install certain modules via Composer after move to Gitlab
>>> [!note] Migrated issue
<!-- Drupal.org comment -->
<!-- Migrated from issue #3044600. -->
Reported by: [kevin.dutra](https://www.drupal.org/user/1312744)
>>>
<p>We use Composer to manage our project. A few of the Drupal module requirements are defined as specific Git commits for varying reasons (e.g. need a bugfix that hasn't been included in an actual release yet), so the Composer definition is something along the lines of<br>
<code>"drupal/calendar": "1.x-dev#934eacf"</code></p>
<p>Prior to the move to Gitlab, there was no issue with this. Composer would clone the git repo at the specified commit and Bob's your uncle. After the switch to Gitlab, however, <strong>some</strong> of our environments are no longer able to actually clone from the repository any longer.</p>
<p>Verbose output of the Composer install yields this:</p>
<pre>[Symfony\Component\Process\Exception\ProcessTimedOutException] <br> The process "git clone --no-checkout 'https://git.drupal.org/project/calendar' 'build/html/modules/contrib/calendar' && cd 'build/html/modules/contrib/calendar' && git remote add composer 'https://git.drupal.org/project/cal <br> endar' && git fetch composer" exceeded the timeout of 300 seconds.</pre><p>
If I try to manually issue the same clone command, I get a little bit more information:</p>
<pre>[kevin.dutra ~]$ git clone --no-checkout 'https://git.drupalcode.org/project/calendar'<br>Initialized empty Git repository in /home/kevin.dutra/calendar/.git/<br>error: RPC failed; result=22, HTTP code = 404</pre><p>It only seems to fail from certain environments (the CentOS ones) and it doesn't seem like we're the first to come across this.<br>
<a href="https://gitlab.com/space-sh/space/issues/7">https://gitlab.com/space-sh/space/issues/7</a><br>
<a href="https://stackoverflow.com/questions/32533379/git-error-rpc-failed-result-22-http-code-404">https://stackoverflow.com/questions/32533379/git-error-rpc-failed-result-22-http-code-404</a></p>
<p>The solution for each of those was the same: make sure the the repository URLs have ".git" at the end. And I can confirm that this works in our case too. Would it be possible to update the Drupal.org Composer definitions so that the repository URLs had this suffix?</p>
issue