OXID 6 EE + Jenkins => composer authentication required

I would like to launch composer “update command --no-scripts --no-plugins” with jenkins command shell but… it throws me:

**Building in workspace /var/lib/jenkins/workspace/jenkins-action-test02
[jenkins-action-test02] $ /bin/bash /tmp/jenkins2367283853190497965.sh
Loading composer repositories with package information

[Composer\Downloader\TransportException]
The ‘https://enterprise-edition.packages.oxid-esales.com/packages.json’ URL required authentication.
You must be using the interactive console to authenticate

update [–prefer-source] [–prefer-dist] [–dry-run] [–dev] [–no-dev] [–lock] [–no-custom-installers] [–no-autoloader] [–no-scripts] [–no-progress] [–no-suggest] [–with-dependencies] [–with-all-dependencies] [-v|vv|vvv|–verbose] [-o|–optimize-autoloader] [-a|–classmap-authoritative] [–apcu-autoloader] [–ignore-platform-reqs] [–prefer-stable] [–prefer-lowest] [-i|–interactive] [–root-reqs] [–] []…

Build step ‘Execute shell’ marked build as failure
Finished: FAILURE**

Probably it is problem with credentials. Anybody know how to set credentials in jenkins?

normaly these credentials are set within the composer

https://getcomposer.org/doc/articles/http-basic-authentication.md

1 Like

If you follow this advice you will get the oppotunity store the credentials in composers cache.

you can add a auth.json to the git with the credentials inside. put this file in the same directory as the composer.json. then composer will read the credentials from this file.

auth.json content:

    {
      "http-basic": {
        „enterprise-edition.packages.oxid-esales.com": {
          "username": „XXX“,
          "password": „XXX“
        }
      }
    }
1 Like