简体   繁体   中英

docker login Succeeded into artifactory-jcr on centos 7 ,but still get ' unknown: Authentication is required',what to do?

I have launched artifactory-jcr in docker on ecs ,then try to pull images from it.at first ,I work on my laptop ,win10,everything is ok,then I move to ecs to login artifactory-jcr ,it Succeeded.but when I try to pull images ,it complains "unknown: Authentication is required".

 [root@iz2zeahcvguz4d9jetqwlz ~]# docker logout 124.70.180.84:8081
Removing login credentials for 124.70.180.84:8081
WARNING: could not erase credentials: error erasing credentials - err: exit status 1, out: `exit status 1: Error: docker-credential-helpers/MTI0LjcwL5MC44NDo4MDgx is not in the password store.`
[root@iz2zeahcvguz4d9jetqwlz ~]# docker login 124.70.180.84:8081
Username: maple
Password: 
Login Succeeded
[root@iz2zeahcvguz4d9jetqwlz ~]# docker pull 124.70.180.84:8081/v2/docker/jib-mvn
Using default tag: latest
Trying to pull repository 124.70.180.84:8081/v2/docker/jib-mvn ... 
Get http://124.70.180.84:8081/v2/v2/docker/jib-mvn/manifests/latest: unknown: Authentication is required
[root@iz2zeahcvguz4d9jetqwlz ~]# pass
Password Store
└── docker-credential-helpers
    └── MTI0LjcwLjE5MC44NDoMDgx
        └── maple
[root@iz2zeahcvguz4d9jetqwlz ~]# 

Do not specify the v2 in the docker pull.

Try:

docker pull 124.70.180.84:8081/docker/jib-mvn

Assuming "docker" is the name of the repo and "jib-mvn" is the name of the image.

After checking https://www.passwordstore.org/

pass init "ZX2C4 Password Storage Key"

mkdir: created directory ‘/home/zx2c4/.password-store’
Password store initialized for ZX2C4 Password Storage Key.
Here, ZX2C4 Password Storage Key is the ID of my GPG key. You can use your standard GPG key or use an alternative one especially for the password store as shown above.

fix it by reinitiating the pass with gpg-id.

at the very first ,I have initiated pass with my email.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM