我正在尝试使用私有存储库更新composer:
php composer.phar update
An existing OAuth token for Composer is present and will be reused [ErrorException] file_put_contents(/srv/data/.composer/config.json): failed to open stream: No such file or directory
我的用户不允许写入此目录/srv/data/
。
我的问题是如何改变config.json
目录?
I have try:
php.composer.phar config --list
[repositories.0.type] vcs
[repositories.0.url] https://github.com/*****/*******.git
[repositories.packagist.type] composer
[repositories.packagist.url] https?://packagist.org
[repositories.packagist.allow_ssl_downgrade] true
[process-timeout] 300
[use-include-path] false
[preferred-install] auto
[notify-on-install] true
[github-protocols] [git, https, ssh]
[vendor-dir] vendor
[bin-dir] bin
[cache-dir] /srv/data/.composer/cache
[cache-files-dir] {$cache-dir}/files (/srv/data/.composer/cache/files)
[cache-repo-dir] {$cache-dir}/repo (/srv/data/.composer/cache/repo)
[cache-vcs-dir] {$cache-dir}/vcs (/srv/data/.composer/cache/vcs)
[cache-ttl] 15552000
[cache-files-ttl] 15552000
[cache-files-maxsize] 300MiB (314572800)
[discard-changes] false
[autoloader-suffix]
[optimize-autoloader] false
[prepend-autoloader] true
[github-domains] [github.com]
[store-auths] prompt
[home] /srv/data/.composer
php composer.phar config home /srv/data/web/vhsots/monsiteweb/
[InvalidArgumentException]
Setting home does not exist or is not supported by this command
config [-g|--global] [-e|--editor] [-a|--auth] [--unset] [-l|--list] [-f|--file="..."] [setting-key] [setting-value1] ... [setting-valueN]
您可以使用COMPOSER_HOME
环境变量更改编写器目录的位置。
COMPOSER_HOME=/some/writable/path php composer.phar update