skip to Main Content

I created a default ASP.Net Core MVC application. I enabled docker and set the OS to linux.

Project setup

I ran the project once to verify it worked. I then tried to publish it to a personal repository on docker hub.

The build and publish are successful. I then get the error:

Failed to push docker image
Running the docker.exe tag command failed.

Error parsing reference: "[email protected]/webapplication1:latest" is not a valid repository/tag: invalid reference format

What do I need to do in order to publish my image to docker?

2

Answers


  1. Chosen as BEST ANSWER

    This error occurred because I entered my email address into the User name field when I was publishing to docker hub:

    Publish to docker

    Docker hub has user name and email fields. You can log into docker hub with either of them. However, the repositories are stored under the user name. They cannot be located via email.

    So when I entered my email address in the user name field, Visual Studio successfully logged me into docker. Then when it tried publishing to [email protected] it failed because there was no docker repository setup for that user name.

    I changed the user name field from my email address to my docker user name. Published again and it worked correctly.


  2. Despite authenticating okay through Visual Studio publish when configuring the publish setup, the username field absolutely requires the email address and not the username.

    Additionally, the registry URL must be all lowercase even though for me it was automatically input as uppercase "NateL..".

    It was easiest to open up the *.pubxml file and make the changes.
    enter image description here

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search