composer / composer/composer

Add possibility to specify the path of an auth.json

Open
#9,920 21 comments 6 reactions 0 assignees View on GitHub
Dominant language
PHP
Stars
29.5k
Forks
4.8k
Avg merge
2d 2h
Merged PRs (30d)
12

Description

It would be nice to have the option to specify the location of the `auth.json`.

In our case we have a repository with a `./composer.json` that provides tools to build and deploy the application and a `src/composer.json` that installs the dependencies of the actual software which has its code source in `src/`.

We need to install modules that require authentication in both `./` and `src/` and therefor it would be awesome to have the possibility to use the `src/auth.json` in the root `./composer.json` as well.

Maybe it could be useful for some users to specify multiple paths. We should still respect the user's `{home}/auth.json` and the `auth.json` at the same path as the currently evaluated `composer.json`.

A config example could be:
```json
{
"config": {
"auth-files": [
"src/auth.json",
"../auth.json",
"vendor/my/package/auth.json"
]
}
}
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.