no basic auth credentials error for accessing the mirror resigtry

2,536 views
Skip to first unread message

Hitesh Gupta

unread,
Apr 13, 2018, 6:03:02 AM4/13/18
to Nexus Users
I have a nexus instance which I have been using for docker images. I also have a proxy repository for docker hub. Nexus instance is on windows 2016.  This mirror setup for docker hub works fine when I use the following command -

docker pull <mirror repo:port>/microsoft/nanoserver.

It downloads the pull from docker hub and store the same on my mirror. All my subsequent pull for this image is from the mirror repo. However , I want to avoid using the mirror repo in my pull. When i try to use it as -

docker pull microsoft/nanoserver.

The pull is always from docker hub. I can see that docker tries to get this from the mirror but fails with the error - I have masked the repo path in the error to avoid sharing in the post

"Attempting next endpoint for pull after error: Get https:/xxxxxxxx/microsoft/nanoserver/manifests/latest: no basic auth credentials"

My mirror has 'Force basic authentication' as Unchecked and realm has been activated for 'Docker bearer token' , Local Authorizing and Local Authenticating. 


Rich Seddon

unread,
Apr 13, 2018, 11:25:33 AM4/13/18
to Nexus Users

Hitesh Gupta

unread,
Apr 16, 2018, 2:15:36 AM4/16/18
to Rich Seddon, Nexus Users
 My understanding of the link you provided  is about not using --registry-mirror option for a private docker repository. however , In my case i am using Nexus as proxy repository for dockerhub repo (https://registry-1.docker.io) and not a private registry..Let me know if I am missing something 

--
You received this message because you are subscribed to the Google Groups "Nexus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nexus-users+unsubscribe@glists.sonatype.com.
To post to this group, send email to nexus...@glists.sonatype.com.
To view this discussion on the web visit https://groups.google.com/a/glists.sonatype.com/d/msgid/nexus-users/f4319db3-e1f7-48bd-a830-a9d3a8391d50%40glists.sonatype.com.
For more options, visit https://groups.google.com/a/glists.sonatype.com/d/optout.

Peter Lynch

unread,
Apr 16, 2018, 1:13:49 PM4/16/18
to Hitesh Gupta, Rich Seddon, Nexus Users
On Mon, Apr 16, 2018 at 3:15 AM, Hitesh Gupta <hite...@gmail.com> wrote:
 My understanding of the link you provided  is about not using --registry-mirror option for a private docker repository. however , In my case i am using Nexus as proxy repository for dockerhub repo (https://registry-1.docker.io) and not a private registry..Let me know if I am missing something 

You used the term mirror, and so we assumed you were using --registry-mirror option of the docker CLI.
 

On Fri, Apr 13, 2018 at 8:55 PM, Rich Seddon <rse...@sonatype.com> wrote:
See here:  https://issues.sonatype.org/browse/NEXUS-9963

On Friday, April 13, 2018 at 5:03:02 AM UTC-5, Hitesh Gupta wrote:
I have a nexus instance which I have been using for docker images. I also have a proxy repository for docker hub. Nexus instance is on windows 2016.  This mirror setup for docker hub works fine when I use the following command -

docker pull <mirror repo:port>/microsoft/nanoserver.

It downloads the pull from docker hub and store the same on my mirror. All my subsequent pull for this image is from the mirror repo. However , I want to avoid using the mirror repo in my pull. When i try to use it as -

docker pull microsoft/nanoserver.

The pull is always from docker hub.

using docker pull without a host and port for a Nexus repository manager hosted registry will always contact the docker hub directly and not Nexus. This sounds normal.

 
I can see that docker tries to get this from the mirror but fails with the error - I have masked the repo path in the error to avoid sharing in the post

"Attempting next endpoint for pull after error: Get https:/xxxxxxxx/microsoft/nanoserver/manifests/latest: no basic auth credentials"


We can't tell if this is accessing Nexus or not.
 
My mirror has 'Force basic authentication' as Unchecked and realm has been activated for 'Docker bearer token' , Local Authorizing and Local Authenticating. 


your pull command should look similar to

docker pull <nexushostname>:<dockerconnectorport>/microsoft/nanoserver

If you still get "no basic auth credentials" then carefully review our documentation:


In particular, make sure the Anonymous user is enabled and has access to docker repository content.

 

--
You received this message because you are subscribed to the Google Groups "Nexus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nexus-users+unsubscribe@glists.sonatype.com.
To post to this group, send email to nexus...@glists.sonatype.com.
To view this discussion on the web visit https://groups.google.com/a/glists.sonatype.com/d/msgid/nexus-users/f4319db3-e1f7-48bd-a830-a9d3a8391d50%40glists.sonatype.com.
For more options, visit https://groups.google.com/a/glists.sonatype.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Nexus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nexus-users+unsubscribe@glists.sonatype.com.
To post to this group, send email to nexus...@glists.sonatype.com.
Reply all
Reply to author
Forward
0 new messages