Docker integration failing when authentication is requred

已回答

I'm attempting to use the Docker integration plugin and can't get a simple Dockerfile to work that pulls from our internal registry. Here is an example Dockerfile I'm trying to use:

 

FROM docker.mycompany.com/my/image:latest

ENTRYPOINT ...

 

When I try to run this Dockerfile or build an image, I get:

Deploying '<unknown> Dockerfile: test/Dockerfile'...
Building image...
Step 1/2 : FROM docker.mycompany.com/my/image:latest


Error: ResponseItem.ErrorDetail[code=<null>,message=Get https://docker.mycompany.com/...: denied: access forbidden]

 

I've set up the "docker.mycompany.com" registry in the Docker/Registry settings and the Test Connection reports "successful". I've also logged in via the command prompt and via PowerShell successfully. Lastly, I've verified a correct entry in the Windows Credential Manager for docker.mycompany.com.

What do I need to do to make this work?

Thanks much!

1

Did you  try to login from the command line first per https://stackoverflow.com/a/46422186/104891 ?

Do you see the auth entry created in the config file for your repository?

0

Yes, I did "docker login" from the command line. Looking at the .docker/config.json file I do see an entry for my registry, but it is empty:

"auths": {

    "docker.mycompany.com": {}

},

But, then there is this after "auths":

"credsStore": "wincred"

Does the plugin not support retrieving credentials from the Windows Credential Manager?

 

0

Sorry for the delays, I've asked the responsible developer to look into it.

0

Docker plugin relies on `docker-java` library, which currently does not support custom credential helpers and reads everything from the config.json directly.

I have just opened https://youtrack.jetbrains.com/issue/IDEA-216531 to track this problem, please vote or follow there. 

 

 

 

 

 

0

Michael Golubev - Is there a work around for this? Perhaps instructions on how to force plaintext/base64 credentials to be stored in the config.json file?

At this point, instead of building Dockerfiles via the PyCharm 100% great UI interface, I have to tab to open a terminal and copy-paste the image build command.

0

Apparently, in the most recent version of Docker for Mac it is impossible to reset "credStore" to plain text.
We will fix the https://youtrack.jetbrains.com/issue/IDEA-216531 to support secure credential stores for the upcoming 2020.1 release.

0

请先登录再写评论。