Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Composer config for http-basic #182

Open
rreynier opened this issue Sep 22, 2021 · 3 comments
Open

Composer config for http-basic #182

rreynier opened this issue Sep 22, 2021 · 3 comments

Comments

@rreynier
Copy link

I am trying to install Laravel Nova in my CI workflow. Nova requires authentication. The easiest way which I did in the past when I manually installed Composer (without this action) was to simply run:

composer config http-basic.nova.laravel.com ${NOVA_USERNAME} ${NOVA_PASSWORD}

Can this be done with this action? Looks like maybe not at least out of the box.

@ramsey
Copy link
Owner

ramsey commented Dec 24, 2021

I'm not sure this should be a concern of this action.

Try out something like this, and let me know if it works for you:

- name: "Configure Composer"
  run: |
    composer config http-basic.nova.laravel.com ${NOVA_USERNAME} ${NOVA_PASSWORD}
- uses: "ramsey/composer-install@v2"

@llaville
Copy link

If I may, I had today with same kind of problem. I wanted to access one of my fork from another project on GitHub.

After reading :

I suggest to use the COMPOSER_AUTH env var strategy

In my case, I've added in my GitHub workflow :

        env:
            COMPOSER_AUTH: '{"github-oauth": {"github.com": "${{ secrets.CI_TOKEN }}"}}'

Using https://getcomposer.org/doc/articles/authentication-for-private-packages.md#http-basic is quite the same (just adjust the json syntax and secrets used

@llaville
Copy link

@ramsey Perharps a NOTE (section about authentication) in the README page will be welcome !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants