zoukankan      html  css  js  c++  java
  • docker harbor x509: certificate signed by unknown authority action: push: unauthorized to access repository

    问题:

    [root@win82 win81.inno.com]# docker push win81.inno.com:443/test/busybox
    Using default tag: latest
    The push refers to repository [win81.inno.com:443/test/busybox]
    Get https://win81.inno.com:443/v2/: x509: certificate signed by unknown authority

    解决:

    将harbor 的主机crt 放到要push 的主机目录/etc/pki/ca-trust/source/anchors/
    [root@win81 cert]# pwd
    /data/cert
    [root@win81 cert]# scp -p win81.inno.com.crt win82:/etc/pki/ca-trust/source/anchors/
    win81.inno.com.crt                                                                                                                        100% 2126     1.0MB/s   00:00 
    
    在push 主机上更新
    [root@win82 certs]# update-ca-trust

    出现另个一个问题

    [root@win82 certs]# docker push win81.inno.com:443/test/busybox:latest
    The push refers to repository [win81.inno.com:443/test/busybox]
    1dad141bdb55: Preparing 
    unauthorized: unauthorized to access repository: test/busybox, action: push: unauthorized to access repository: test/busybox, action: push

    登录后再试

    [root@win82 certs]# docker login win81.inno.com:443
    Username: admin
    Password: 
    WARNING! Your password will be stored unencrypted in /root/.docker/config.json.
    Configure a credential helper to remove this warning. See
    https://docs.docker.com/engine/reference/commandline/login/#credentials-store
    
    Login Succeeded
    [root@win82 certs]# docker push win81.inno.com:443/test/busybox:latest
    The push refers to repository [win81.inno.com:443/test/busybox]
    1dad141bdb55: Pushed 
    latest: digest: sha256:99243e861067446c9aed305b5690cccb88658d23af3fde338398f27386ded1be size: 527
  • 相关阅读:
    流复制-pg_basebackup (有自定义表空间)
    流复制-pg_basebackup (没有自定义表空间)
    PG 更新统计信息
    PG修改参数方法
    Postgres的索引01
    Postgres基础操作
    PostgreSQL安装
    SQL拦截器
    没对象的快自己写一个吧!带你了解一下python对象!
    喜欢看电影来哦!教你如果使用Python网络爬虫爬取豆瓣高分电影!
  • 原文地址:https://www.cnblogs.com/tingxin/p/14259237.html
Copyright © 2011-2022 走看看