【发布时间】:2021-04-02 11:34:53
【问题描述】:
运行sudo docker-compose build时收到错误消息
在我的 Dockerfile 中,它正在运行:
RUN npm install
错误信息说:
npm ERR! Error while executing:
npm ERR! /usr/bin/git ls-remote -h -t https://git.mycompany.com/path_public/speakeasy.git
npm ERR!
npm ERR! remote: HTTP Basic: Access denied
npm ERR! fatal: Authentication failed for 'https://git.mycompany.com/path_public/speakeasy.git/'
npm ERR!
npm ERR! exited with error code: 128
我不明白为什么运行 npm install 需要 git 凭据。
我尝试使用docker cp 将我的本地 git 凭据复制到 docker 容器,但它不起作用。
【问题讨论】:
-
您是否使用从私有注册表安装的软件包?
-
抱歉回复晚了。是的,它是一个私人注册表。我已经解决了这个问题会给出更新。谢谢