在使用 Nexus3 做镜像仓库做代理时,使用 docker login、docker pull 会报如下错误
[root@localhost ~]# docker login 172.16.248.62:5000
Username: admin
Password:
Error response from daemon: login attempt to http://172.16.248.62:5000/v2/ failed with status: 401 Unauthorized
docker pull
[root@localhost ~]# docker pull 172.16.248.62:5000/xxx/xxx:v2.0.0
Error response from daemon: unauthorized: authentication required
解决:
验证:
[root@localhost ~]# docker login 172.16.248.62:5000
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
登陆成功