composer: Configuration defined for http.basic configuration values is not listed as expected with composer config
Hello everybody,
composer config does not display the appropriate value for http-basic when we use composer config -l. See the example bellow:
echo "{}" > composer.json
rm auth.json
test -f composer || (curl -sS https://getcomposer.org/installer | php -- --filename=composer)
./composer self-update
./composer config -a -f composer.json http-basic.subdomain.domain.com "username" "password";
./composer config -a -f composer.json http-basic.subdomain2.domain.com "username2" "password2";
cat auth.json
{
"http-basic": {
"subdomain.domain.com": {
"username": "username",
"password": "password"
},
"subdomain2.domain.com": {
"username": "username2",
"password": "password2"
}
}
}
./composer config -l -f composer.json | grep http-basic
[http-basic.subdomain.domain.com.username] username
[http-basic.subdomain.domain.com.password] password
[http-basic.subdomain.domain.subdomain2.domain.com.username] username2
[http-basic.subdomain.domain.subdomain2.domain.com.password] password2
i expect it to be:
[http-basic.subdomain.domain.com.username] username
[http-basic.subdomain.domain.com.password] password
[http-basic.subdomain2.domain.com.username] username2
[http-basic.subdomain2.domain.com.password] password2
This is a problem when we try to scripting these configuration values.
About this issue
- Original URL
- State: closed
- Created 9 years ago
- Comments: 19 (14 by maintainers)
Commits related to this issue
- fixes #4459 — committed to alcohol/composer by alcohol 9 years ago
- itteratively expand key and attempt to match fixes #4459 (also) — committed to alcohol/composer by alcohol 9 years ago
๐ @alcohol
composer config http-basic.subdomain.domain.com username password
helped my iterate my magento2 vagrant, although it is hella annoying of repo providers to require login to install their SW, itโs great that composer provides ways to allow me to continue to automate this.