Cannot login to private registry on win 10 with 401

Hi

OS Version - Windows 10
Docker version 18.09.2, build 6247962

Steps to reproduce

  1. I created a registry on my local so I can reach http://hub.docker.local:5000/v2/_catalog and see the repository list

  2. I run the command
    docker run --entrypoint htpasswd registry:2 -Bbn testuser testpass > auth/htpasswd
    which successfully creates the file

  3. I run the next command
    docker run -d -p 5000:5000
    –restart=always --name hub.local
    -v ${pwd}/auth:/auth
    -e “REGISTRY_AUTH=htpasswd”
    -e “REGISTRY_AUTH_HTPASSWD_REALM=Registry Realm”
    -e REGISTRY_AUTH_HTPASSWD_PATH=/auth/htpasswd registry:2
    it also works

  4. I try to login as
    docker login hub.docker.local:5000
    and get 401 unauthorized error from daemon.

Also when I
cat ~/.docker/config.json
I see the empty list in auths section

{
“auths”: {},
“HttpHeaders”: {
“User-Agent”: “Docker-Client/18.09.2 (windows)”
},
“credsStore”: “wincred”
}

What am I doing wrong?
Thanks