尝试在Docker容器中安装私人PHP存储库
我正在升级需要一个私有软件包的软件包(此软件包的代码托管在Bitbucket上)。 我已经创建了一个带有以下内容的docker-compose.yaml
文件:
version: '3'
services:
composer:
image: composer:2.3.5
environment:
- COMPOSER_CACHE_DIR=/app/.cache/composer
volumes:
- .:/app
- ~/.ssh/id_rsa:/root/.ssh/id_rsa:ro
因此,我只需要运行docker-compose run composer install
即可安装所有必需的依赖项,并且可以正常工作完美地使用公共包裹。但是,当它试图安装专用软件包时,我会遇到此错误:
[email protected]: Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
我将私钥传递到容器中,甚至在我尝试运行Composer install
时,它甚至要求使用密码。继续获得此拒绝
错误。
我想念什么吗?
提前致谢!
I'm upgrading a package that requires a private package (the code for this package is hosted on bitbucket).
I've created a docker-compose.yaml
file with the following contents:
version: '3'
services:
composer:
image: composer:2.3.5
environment:
- COMPOSER_CACHE_DIR=/app/.cache/composer
volumes:
- .:/app
- ~/.ssh/id_rsa:/root/.ssh/id_rsa:ro
So I just need to run docker-compose run composer install
to install all required dependencies and it works perfectly with public packages. However, when it tries to install the private package I'm getting this error:
[email protected]: Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
I'm passing the private key to the container and it even asks for the passphrase when I try to run composer install
but I keep getting this Permission denied
error.
Am I missing something?
Thanks in advance!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论