Answers.Body: <p>It is described in the docs but it's in the examples/feeds one. It's just</p>
  <pre><code>composer config gitlab-domains lab.civicrm.org
  composer config gitlab-token.lab.civicrm.org 'your-token'
  </code></pre>
  <p>P.S. I don't think the note about problems with composer v2 is still true.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2024-12-09T19:43:07.950Z
Answers.LastActivityDate: 2024-12-09T19:43:07.950Z
Answers.UserDisplayName: Demerit
Body: <p>Is there a way to manage a CiviCRM ESR instance based on Composer, using a <a href="https://getcomposer.org/doc/articles/authentication-for-private-packages.md#gitlab-token" rel="nofollow noreferrer">gitlab-token</a>?
  I followed the instructions given by the esr-repo-https example. However there is no mention of the gitlab-token authentification way.
  The Composer config is as follows:</p>
  <pre><code>[repositories.esr-drupal-8.url] https://lab.civicrm.org/esr/drupal-8.
  [repositories.esr-packages.url] https://lab.civicrm.org/esr/packages.git
  [repositories.esr-core.url] https://lab.civicrm.org/esr/core.git
  [allow-plugins.civicrm/composer-compile-plugin] true
  [allow-plugins.civicrm/composer-downloads-plugin] true
  [allow-plugins.civicrm/civicrm-asset-plugin] true
  [gitlab-domains] [gitlab.com, https://lab.civicrm.org/esr/]
  [gitlab-token.https://lab.civicrm.org/esr/] &lt; PRIVATE TOKEN &gt;
  </code></pre>
  <p>Instead of using the gitlab token, Composer keeps asking to authenticate using credentials:</p>
  <pre><code>Authentication required (lab.civicrm.org):
    Username:
  </code></pre>
  <p>PS: I already use this gitlab-token to handle a non Composer install.</p>
  
Tags: <drupal><composer><gitlab>
Title: Composer install of ESR using private token
ThreadText: # Composer install of ESR using private token
  
  (Asked by: username_0 on 2024-12-09)
  
  Is there a way to manage a CiviCRM ESR instance based on Composer, using a gitlab-token?
  I followed the instructions given by the esr-repo-https example. However there is no mention of the gitlab-token authentification way.
  The Composer config is as follows:
  [repositories.esr-drupal-8.url] https://lab.civicrm.org/esr/drupal-8.
  [repositories.esr-packages.url] https://lab.civicrm.org/esr/packages.git
  [repositories.esr-core.url] https://lab.civicrm.org/esr/core.git
  [allow-plugins.civicrm/composer-compile-plugin] true
  [allow-plugins.civicrm/composer-downloads-plugin] true
  [allow-plugins.civicrm/civicrm-asset-plugin] true
  [gitlab-domains] [gitlab.com, https://lab.civicrm.org/esr/]
  [gitlab-token.https://lab.civicrm.org/esr/] < PRIVATE TOKEN >
  
  Instead of using the gitlab token, Composer keeps asking to authenticate using credentials:
  Authentication required (lab.civicrm.org):
    Username:
  
  PS: I already use this gitlab-token to handle a non Composer install.
  
  **Tags:** drupal, composer, gitlab
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2024-12-09. Score: 1 | Accepted answer
  
  It is described in the docs but it's in the examples/feeds one. It's just
  composer config gitlab-domains lab.civicrm.org
  composer config gitlab-token.lab.civicrm.org 'your-token'
  
  P.S. I don't think the note about problems with composer v2 is still true.
  
  
  ---
  
  