#4301·jib

推送到 GitHub 失败,错误为 BLOB_UPLOAD_UNKNOWN

作者: mihalyr创建于 2024年8月28日更新于 2026年7月21日
标签priority:p3type:bug

问题描述:

当使用 Jib Gradle 插件将容器镜像推送到 GitHub 容器注册(ghcr.io)时,操作中常常会出现以下错误:

> com.google.cloud.tools.jib.plugins.common.BuildStepsExecutionException: Tried to push BLOB for ghcr.io/<org>/<repo> with digest sha256:<hash> but failed because: other: blob upload unknown to registry

堆栈跟踪中包含以下错误消息:

Caused by: com.google.api.client.http.HttpResponseException: 404 Not Found
PUT https://ghcr.io/v2/<org>/<repo>/blobs/upload/<uuid>?digest=sha256:<hash>
{"errors":[{"code":"BLOB_UPLOAD_UNKNOWN","message":"blob upload unknown to registry"}]}

	at com.google.api.client.http.HttpResponseException$Builder.build(HttpResponseException.java:293)
	at com.google.api.client.http.HttpRequest.execute(HttpRequest.java:1118)
	at com.google.cloud.tools.jib.http.FailoverHttpClient.call(FailoverHttpClient.java:349)
	... 176 more

到目前为止,每次手动重新运行失败的作业(GitHub Actions 工作流)时,都会在不出现问题的情况下成功重试。

内容来源: GoogleContainerTools/jib