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

Authentication required #99

Open
ericlaflamme opened this issue May 26, 2016 · 1 comment
Open

Authentication required #99

ericlaflamme opened this issue May 26, 2016 · 1 comment

Comments

@ericlaflamme
Copy link

Hi all!

When a composer need an secure repo to install, it doesn't seems to work. I have this error:

[Composer\Downloader\TransportException]
The 'https://repo.magento.com/packages.json' URL required authentication.
You must be using the interactive console to authenticate

I checked and I created the auth.json before. If I run on CLI, it work just fine. I looked on google and every solution seems to point to an absent auth.json but it work on CLI for me. So it must be something else. Composer doesn't like puppet for authentication?

Anyone have a solution for this?

Thanks!

@ericlaflamme
Copy link
Author

I fixed the problem by explicit set the "user" in the class{ composer }. I don't know why but the user variable was empty and was keeping using root and a mixed with my user. It wasn't finding the auth.json for authenticating to the repo.

I'm not sure what lesson we can get from that. Is that the default behavior to run as root with include composer? And then use the user in composer::project ?

This is what I need to install composer:

class { 'composer':
user => "$owner",
composer_home => "/home/$owner/.composer",
suhosin_enabled => false,
}

then my project:

composer::project { 'magento2':
project_name => 'magento/project-community-edition', # REQUIRED
target_dir => "$docroot", # REQUIRED
version => '2.0.7', # Some valid version string
prefer_source => true,
stability => 'stable', # Minimum stability setting
keep_vcs => false, # Keep the VCS information
dev => false, # Install dev dependencies
repository_url => "https://repo.magento.com/", # Custom repository URL
user => "$owner", # Set the user to run as
}

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

1 participant