How to fix BSS Composer is not familiar with GitlabCI?

Created by Jane D, Modified on Tue, 17 Nov 2020 at 11:05 AM by Jane D

QUESTION:

I'm encountering an issue with Gitlab's CI.
I managed to install the vendor locally with these credentials, however, when using Gitlab’s CI, I get an authentication error as follows:

[RuntimeException]                                                                                                                                                                  
Failed to execute git clone --no-checkout 'https://bss_composer@bitbucket.org/bsssupport/package_m2_magento2-guest-to-customer.git' '/builds/project/vendor/bsscommerce/guest-to-customer' && cd '/builds/project/vendor/bsscommerce/guest-to-customer' && git remote add composer 'https://bss_composer@bitbucket.org/bsssupport/package_m2_magento2-guest-to-customer.git' && git fetch composer && git remote set-url origin 'https://bss_composer@bitbucket.org/bsssupport/package_m2_magento2-guest-to-customer.git' && git remote set-url composer 'https://bss_composer@bitbucket.org/bsssupport/package_m2_magento2-guest-to-customer.git'


Cloning into '/builds/project/vendor/bsscommerce/guest-to-customer'...
remote: Invalid username or password
fatal: Authentication failed for 'https://bss_composer@bitbucket.org/bsssupport/package_m2_magento2-guest-to-customer.git/'

Small precision: the credentials have been added to the auth.json file.


After debugging a little, it seems like your repository tries to access it from bitbucket, which requires a bitbucket account.

Isn’t there a way to bypass that?


ANSWER:

The issue above due to the fact that BSS Composer is not familiar with Gitlab-CI.


To solve the issue, please do as steps below:

1. Config cache for composer https://gist.github.com/prog/b716b815ed4ec05d8ca57adc90be9e97 

2. Config repository URL including Basic Authentication information following:

composer config repositories.bsscommerce composer https://<public_key>:<private_key>@composer.bsscommerce.com/community


If you need further assistance, please do not hesitate to leave us a message via https://bsscommerce.com/contact.

We'd be happy to support!

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select atleast one of the reasons

Feedback sent

We appreciate your effort and will try to fix the article