docker登录-存储凭证错误-写入权限错误 [英] docker login - error storing credentials - write permissions error
问题描述
我正在运行 docker login
命令作为Bamboo构建作业的一部分.该命令文本是通过 aws ecr get-login
调用获得的,并在子shell中执行.
I am running a docker login
command as a part of the Bamboo build job. The command text is obtained by aws ecr get-login
call and executed in a subshell.
此命令失败,并带有错误保存凭据:错误存储凭据-err:退出状态1,out:写入权限错误
作为Bamboo构建的一部分运行,但完全相同的命令在Mac上作为构建代理的Terminal上,它会成功.
This command fails with Error saving credentials: error storing credentials - err: exit status 1, out: write permissions error
when ran as a part of the Bamboo build, but the exact same command ran in the Terminal on the Mac that is the build agent, it succeeds.
使用终端:
-
aws ecr get-login
成功并返回docker login
命令文本 -
docker login -u ... -p ... -e none ...
成功并登录 - KeyChain中有ECR URL的记录
-
〜/.docker/config.json
中有一个条目
aws ecr get-login
succeeds and returns thedocker login
command textdocker login -u ... -p ... -e none ...
succeeds and logs in- There is a record for the ECR URL in KeyChain
- There is an entry in
~/.docker/config.json
使用Bamboo:
-
aws ecr get-login
成功并返回docker login
命令文本 -
docker login -u ... -p ... -e none ...
失败,并显示上述错误 - 所有应用程序都可以使用KeyChain记录没有任何区别'
-
chmod 777〜/.docker/config.json
没有区别
aws ecr get-login
succeeds and returns thedocker login
command textdocker login -u ... -p ... -e none ...
fails with the error above- KeyChain record being made available to all applications makes no difference'
chmod 777 ~/.docker/config.json
makes no difference
Bamboo构建和Terminal会话都在同一用户- builduser
下进行.两者的 whoami
是相同的.两者的 stat〜/.docker/config.json
相同-两者均可写.
Both the Bamboo build and the Terminal session happen under the same user - builduser
. whoami
is the same for both. stat ~/.docker/config.json
is the same for both - writable for both.
您能想到进一步的方法来发现上下文之间的差异吗?Bamboo在终端中运行构建,而我在终端中运行?上面所有与 docker login
相关的错误,在网上都找不到.
Can you think of further ways of discovering the differences between the context Bamboo runs the build in and I do in the terminal? The error above, verbatim, related to docker login
is nowhere to be found online.
推荐答案
我必须删除现有的config.json文件.它不会覆盖或修改我所拥有的那个.
I had to remove my existing config.json file. It would not overwrite or modify the one that I had.
这篇关于docker登录-存储凭证错误-写入权限错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!