docker unauthorized: authentication required - upon push with successful login

前端 未结 24 3764
隐瞒了意图╮
隐瞒了意图╮ 2020-11-28 06:21

While pushing the docker image (after successful login) from my host I am getting \"unauthorized: authentication required\".

Details below.

-bash-4.         


        
24条回答
  •  日久生厌
    2020-11-28 06:48

    There has already been good answers but I would like to mention one - You do NOT need to create a repository in advance before pushing it.

    The problem for me was that I didn't set the correct username of the account I logged in to. But once the correct username is set before the image (e.g. YOURNAME/YOURIMAGE) via its tag, you can push it without creating a new repository in advance.

    sudo docker tag IMAGE:VERSION USERNAME/IMAGE:VERSION
    sudo docker push USERNAME/IMAGE:VERSION
    

提交回复
热议问题