大网数据广告活动
服务器运维问答

gcloud service account oauth token timeout causing container service auth failure

· 52CE 我爱测

First time question, and I am also new to attempting to configure/administer google cloud services. Please be gentle. My employer uses gcloud ontainer registry to store images, and on the client side, we use use gcloud docker pul…

问题原文

原帖链接 · user6005293 · CC BY-SA 3.0

First time question, and I am also new to attempting to configure/administer google cloud services. Please be gentle.

My employer uses gcloud ontainer registry to store images, and on the client side, we use use gcloud docker pull ... commands to push and pull from this registry. Due to circumstances beyond our control, we sometimes need to transfer large images over a very slow network connection. This can sometimes take long enough that the oauth bearer token (timeout: 3600s) expires during the transfer. When this happens, the next image layer that the gcloud docker pull command attempts fails.

We end up several successfully pulled layers, and then see an error message something like:

Server error while fetching image layer Please login prior to pull

Is it possible to configure the timeout of the oauth bearer token? If so, how? Nothing obvious in gcloud developer console.

Is there another solution to this problem I may be missing?

已采纳解答

原帖链接 · Wei · CC BY-SA 3.0

please see the link below. If you use a service account to perform the pulls you can avoid this:

https://cloud.google.com/container-registry/docs/auth#using_a_json_key_file

Unfortunately with the access-token based approach Docker isn't designed to allow us to refresh it upon expiration, which is one part of why we added private key support.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2016-03-02)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 3.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。