2

I'm setting up Circle CI with Magento 2. Circle has Composer available out of the box, but I'm not sure how to add the repo.magento.com credentials during my builds.

Circle CI has a setting page where you can add Checkout SSH keys, SSH Permissions, API Permission, etc., but I'm not sure if any of these are for Composer. Normally, you would need to update ~/.composer/auth.json with your credentials to access repo.magento.com.

Has anybody set this up properly?

Error I'm getting during the Circle CI build.

Installing magento/framework (100.1.1)
Downloading: Connecting...

[Composer\Downloader\TransportException]                                     
The 'https://repo.magento.com/archives/magento/framework/magento-framework-  
100.1.1.0.zip' URL could not be accessed: HTTP/1.1 403 Forbidden    
  • check first url : repo.magento.com is open or not in your system. – Suresh Chikani Oct 7 '16 at 5:46
  • @SHPatel, I don't follow. My local machine is configured to work with repo.magento.com. It's the Circle CI build that needs it. – musicliftsme Oct 7 '16 at 15:53
2

If anyone is interested, the solution is to actually make the auth.json file available in your repo and create a dependency in circle.yml.

dependencies:
  pre:
    - mkdir -p ~/.composer && cp /path/to/composers/auth.json ~/.composer/auth.json
  • You could probably generate it in circle.yml using Circle's private environment variables as placeholders right? – Robbie Averill Sep 25 '17 at 10:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.