尝试推送到私有不安全的Docker注册表时检查推送权限时出错 [英] Error checking push permissions when trying to push to private insecure docker registry

查看:262
本文介绍了尝试推送到私有不安全的Docker注册表时检查推送权限时出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在kubernetes,kaniko上使用gitlabRunner将图像推送到docker私有注册表(不安全),我如何赋予kaniko推送权限?

I am using gitlab runner on kubernetes, kaniko to push image to docker private registry(insecure), how could I give kaniko push permissions?

我尝试了-不安全的注册表,--skip-tls-verify参数,但是有相同的错误

I tried --insecure-registry, --skip-tls-verify params but there is the same error

build:
  stage: build
  image:
    name: gcr.io/kaniko-project/executor:debug
    entrypoint: [""]
  script:
    - /kaniko/executor --context $CI_PROJECT_DIR --dockerfile $CI_PROJECT_DIR/Dockerfile --insecure-registry --destination registry-ip:5000/soccer

错误检查推送权限-确保您输入了正确的标记名,并且您已正确验证身份,然后重试:检查 registry-ip:5000 / soccer的推送权限:发表 http:// registry-ip:5000 / v2 / soccer / blobs / uploads / : net / http:HTTP / 1.x传输连接断开: HTTP响应格式错误 \x15\x03\x01\x00\x02\x02\x16

error checking push permissions -- make sure you entered the correct tag name, and that you are authenticated correctly, and try again: checking push permission for "registry-ip:5000/soccer": Post http://registry-ip:5000/v2/soccer/blobs/uploads/: net/http: HTTP/1.x transport connection broken: malformed HTTP response "\x15\x03\x01\x00\x02\x02\x16"

推荐答案

使用不安全的注册表,您必须使用kaniko执行程序的 --insecure 选项,例如:

In case of using the unsecured registry you have to use --insecure option of kaniko executor, for exmaple:

- /kaniko/executor --insecure --context $CI_PROJECT_DIR --dockerfile $CI_PROJECT_DIR/Dockerfile --destination $MY_REGISTRY/$MY_IMAGE:$MY_IMAGE_TAG

这篇关于尝试推送到私有不安全的Docker注册表时检查推送权限时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆