You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was having issues with the cert chain, so I followed what is on this thread for docker-osx: moby/moby#3683 . I'm able to do a docker login just fine using a new binary on mac os x.
However when using fig and having the Dockerfile pull from the same private registry I get the following error using fig build:
Step 1 : FROM ssl-repo.com/image
Pulling repository ssl-repo.com/image
Error: Authentication is required.
Does fig read the .dockercfg? Any other ideas on what the issue could be here?
@thpham Thanks, works fine with the official private repository in version 0.8.0.
Just a note, you have to use a full url at login and in your fig.yml file, with the protocol part.
If I do docker pull docker.mydomain.com/matt/nginx:latest
it works fine
However, if I do a fig up
I get:
Pulling nginx (docker.mydomain.com/matt/nginx:latest )...
Traceback (most recent call last):
File "", line 3, in
File "/code/build/fig/out00-PYZ.pyz/fig.cli.main", line 31, in main
File "/code/build/fig/out00-PYZ.pyz/fig.cli.docopt_command", line 21, in sys_dispatch
File "/code/build/fig/out00-PYZ.pyz/fig.cli.command", line 28, in dispatch
File "/code/build/fig/out00-PYZ.pyz/fig.cli.docopt_command", line 24, in dispatch
File "/code/build/fig/out00-PYZ.pyz/fig.cli.command", line 51, in perform_command
File "/code/build/fig/out00-PYZ.pyz/fig.cli.main", line 225, in pull
File "/code/build/fig/out00-PYZ.pyz/fig.project", line 185, in pull
File "/code/build/fig/out00-PYZ.pyz/fig.service", line 431, in pull
File "/code/build/fig/out00-PYZ.pyz/docker.client", line 733, in pull
File "/code/build/fig/out00-PYZ.pyz/docker.auth.auth", line 69, in resolve_repository_name
File "/code/build/fig/out00-PYZ.pyz/docker.auth.auth", line 48, in expand_registry_url
docker.errors.DockerException: HTTPS endpoint unresponsive and insecure mode isn't enabled.
I'm having a similar issue. If I don't set REQUESTS_CA_BUNDLE, I see the stacktrace posted by @matthuisman. If I set REQUESTS_CA_BUNDLE to the path to my crt, I get:
Pulling image my-private-docker-registry:8080/demo-simulator:10...
Traceback (most recent call last):
File "", line 3, in
File "/code/build/fig/out00-PYZ.pyz/fig.cli.main", line 31, in main
File "/code/build/fig/out00-PYZ.pyz/fig.cli.docopt_command", line 21, in sys_dispatch
File "/code/build/fig/out00-PYZ.pyz/fig.cli.command", line 28, in dispatch
File "/code/build/fig/out00-PYZ.pyz/fig.cli.docopt_command", line 24, in dispatch
File "/code/build/fig/out00-PYZ.pyz/fig.cli.command", line 56, in perform_command
File "/code/build/fig/out00-PYZ.pyz/fig.cli.main", line 427, in up
File "/code/build/fig/out00-PYZ.pyz/fig.project", line 174, in up
File "/code/build/fig/out00-PYZ.pyz/fig.service", line 199, in recreate_containers
File "/code/build/fig/out00-PYZ.pyz/fig.service", line 187, in create_container
File "/code/build/fig/out00-PYZ.pyz/fig.progress_stream", line 37, in stream_output
File "/code/build/fig/out00-PYZ.pyz/fig.progress_stream", line 50, in print_output_event
fig.progress_stream.StreamOutputError: Authentication is required.
I am still having the issue with logging in to a private repository.
It seems from other commenters that this may have been solved, but I cannot get it to work with Fig 1.0.1.
Any sample fig.yml file that shows how to use a Basic Auth with a private repository behind https would be greatly appreciated.
Pulling image registry.xxxx.com/live:dev...
Traceback (most recent call last):
File "/usr/local/bin/fig", line 9, in <module>
load_entry_point('fig==1.0.1', 'console_scripts', 'fig')()
File "build/bdist.macosx-10.10-intel/egg/fig/cli/main.py", line 31, in main
File "build/bdist.macosx-10.10-intel/egg/fig/cli/docopt_command.py", line 21, in sys_dispatch
File "build/bdist.macosx-10.10-intel/egg/fig/cli/command.py", line 28, in dispatch
File "build/bdist.macosx-10.10-intel/egg/fig/cli/docopt_command.py", line 24, in dispatch
File "build/bdist.macosx-10.10-intel/egg/fig/cli/command.py", line 56, in perform_command
File "build/bdist.macosx-10.10-intel/egg/fig/cli/main.py", line 434, in up
File "build/bdist.macosx-10.10-intel/egg/fig/project.py", line 174, in up
File "build/bdist.macosx-10.10-intel/egg/fig/service.py", line 222, in recreate_containers
File "build/bdist.macosx-10.10-intel/egg/fig/service.py", line 210, in create_container
File "build/bdist.macosx-10.10-intel/egg/fig/progress_stream.py", line 37, in stream_output
File "build/bdist.macosx-10.10-intel/egg/fig/progress_stream.py", line 50, in print_output_event
fig.progress_stream.StreamOutputError: Authentication is required.
I had the same issue as well. After looking around in docker-py I found docker/docker-py#241. The solution found was to add /v1/ to the registry address. You can do this in two ways either edit .dockercfg and change the registry address to https://mydomain.com/v1/ or run docker logout https://mydomain.com/ and then docker login https://mydomain.com/v1/. Both Docker and Fig work with this configuration. Tested with Docker 1.3.2, Fig 1.0.1 and Docker Registry 0.9.0.
@rafael adding /v1/ to the address still works for me with Docker 1.4.1. Which program (Docker or Fig) doesn't work and what error are you receiving? Also, what is the version of the Docker Registry you are trying to connect to?
I was having the same issue of docker pull working on quay.io, but docker-compose pull gives 403. I tried the /v1/ workaround and it didn't help. I have also installed docker-compose 1.4.0rc2, but still get the error:
Error: Status 403 trying to pull repository _______________: "{"error": "Permission Denied"}"
my docker version is 1.6.2, and this is in the OSX boot2docker environment.
I also tried the test.py and the script is able to return my credential without any issue.
Service 'datasets' failed to build: Error: Status 403 trying to pull repository library/ruby: "{\"error\": \"Unauthorized getting repository images\"}"
When I do a build. Doing a docker pull on the repository throwing the error works fine. The private repository is using artifactory. I have my permissions setup in a global .dockercfg
@aanand Hi, thanks for the quick reply. I tried both Compose 1.3.3 and 1.4.0rc2, but for both compose, when I try docker-compose up to pull the quay.io images specified in docker-compose.yml, or simply does docker-compose pull, I continue to get
Error: Status 403 trying to pull repository _______________: "{"error": "Permission Denied"}"
however docker pull to pull my private quay.io images works fine
Perhaps this is a docker-py issue? What version of docker-py is everyone using that still experiences this issue? I'm running with docker-1.8.1, docker-py-1.3.1, and docker-compose-1.4.0 without issue.
I have the same Authentication is required issue with private repository. The case is when I pull image directly from docker client it always works. However if I run docker-compose up it sometimes prompts ERROR: for my-service unauthorized: authentication required, and sometimes doesn't
# uname -a
Linux 3.13.0-71-generic #114-Ubuntu SMP Tue Dec 1 02:34:22 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
# docker version
Client:
Version: 1.10.0
API version: 1.22
Go version: go1.5.3
Git commit: 590d5108
Built: Thu Feb 4 18:36:33 2016
OS/Arch: linux/amd64
Server:
Version: swarm/1.2.0
API version: 1.22
Go version: go1.5.4
Git commit: a6c1f14
Built: Wed Apr 13 05:58:31 UTC 2016
OS/Arch: linux/amd64
# docker-compose version
docker-compose version 1.7.0, build 0d7bf73
docker-py version: 1.8.0
CPython version: 2.7.9
OpenSSL version: OpenSSL 1.0.1e 11 Feb 2013
Activity
bfirsh commentedon Feb 4, 2014
No it doesn't, and we should support that. Thanks for the suggestion!
thpham commentedon Jun 13, 2014
@ahromis @bfirsh I notice that the authentication with fig and .dockercfg works but the registry should be declared with an url that include the version (ex. https://private_registry.domain.tld/v1/ ). It seems there is a bug https://github.com/orchardup/fig/blob/master/fig/packages/docker/auth/auth.py#L66 if you did a
$ docker login https://private_registry.domain.tld
zazabe commentedon Aug 20, 2014
@thpham Thanks, works fine with the official private repository in version
0.8.0.Just a note, you have to use a full url at login and in your
fig.ymlfile, with the protocol part.allenan commentedon Oct 24, 2014
Really looking for this functionality as well. Any suggested workarounds for the time being?
matthuisman commentedon Nov 3, 2014
I'm having a similar issue using a private registry:
nginx:
image: docker.mydomain.com/matt/nginx:latest
ports:
- "80:80"
If I do docker pull docker.mydomain.com/matt/nginx:latest
it works fine
However, if I do a fig up
I get:
Pulling nginx (docker.mydomain.com/matt/nginx:latest )...
Traceback (most recent call last):
File "", line 3, in
File "/code/build/fig/out00-PYZ.pyz/fig.cli.main", line 31, in main
File "/code/build/fig/out00-PYZ.pyz/fig.cli.docopt_command", line 21, in sys_dispatch
File "/code/build/fig/out00-PYZ.pyz/fig.cli.command", line 28, in dispatch
File "/code/build/fig/out00-PYZ.pyz/fig.cli.docopt_command", line 24, in dispatch
File "/code/build/fig/out00-PYZ.pyz/fig.cli.command", line 51, in perform_command
File "/code/build/fig/out00-PYZ.pyz/fig.cli.main", line 225, in pull
File "/code/build/fig/out00-PYZ.pyz/fig.project", line 185, in pull
File "/code/build/fig/out00-PYZ.pyz/fig.service", line 431, in pull
File "/code/build/fig/out00-PYZ.pyz/docker.client", line 733, in pull
File "/code/build/fig/out00-PYZ.pyz/docker.auth.auth", line 69, in resolve_repository_name
File "/code/build/fig/out00-PYZ.pyz/docker.auth.auth", line 48, in expand_registry_url
docker.errors.DockerException: HTTPS endpoint unresponsive and insecure mode isn't enabled.
Any ideas?
mattupstate commentedon Nov 19, 2014
@matthuisman you might try setting an environment variable in the shell you're calling fig from:
This might help since fig uses the requests library internally and it supports this env var.
chadshowalter commentedon Dec 9, 2014
I'm having a similar issue. If I don't set REQUESTS_CA_BUNDLE, I see the stacktrace posted by @matthuisman. If I set REQUESTS_CA_BUNDLE to the path to my crt, I get:
Pulling image my-private-docker-registry:8080/demo-simulator:10...
Traceback (most recent call last):
File "", line 3, in
File "/code/build/fig/out00-PYZ.pyz/fig.cli.main", line 31, in main
File "/code/build/fig/out00-PYZ.pyz/fig.cli.docopt_command", line 21, in sys_dispatch
File "/code/build/fig/out00-PYZ.pyz/fig.cli.command", line 28, in dispatch
File "/code/build/fig/out00-PYZ.pyz/fig.cli.docopt_command", line 24, in dispatch
File "/code/build/fig/out00-PYZ.pyz/fig.cli.command", line 56, in perform_command
File "/code/build/fig/out00-PYZ.pyz/fig.cli.main", line 427, in up
File "/code/build/fig/out00-PYZ.pyz/fig.project", line 174, in up
File "/code/build/fig/out00-PYZ.pyz/fig.service", line 199, in recreate_containers
File "/code/build/fig/out00-PYZ.pyz/fig.service", line 187, in create_container
File "/code/build/fig/out00-PYZ.pyz/fig.progress_stream", line 37, in stream_output
File "/code/build/fig/out00-PYZ.pyz/fig.progress_stream", line 50, in print_output_event
fig.progress_stream.StreamOutputError: Authentication is required.
If instead I do:
docker pull my-private-docker-registry:8080/demo-simulator:10
it works (assuming my .dockercfg includes a valid login).
Is there a workaround, or is using fig with a SSL private repository currently not supported?
amosschallich commentedon Dec 13, 2014
I am still having the issue with logging in to a private repository.
It seems from other commenters that this may have been solved, but I cannot get it to work with Fig 1.0.1.
Any sample fig.yml file that shows how to use a Basic Auth with a private repository behind https would be greatly appreciated.
gregtap commentedon Dec 15, 2014
Same issue here even with latest src from master.
fig.progress_stream.StreamOutputError: Authentication is required.
When I add a:
In service.py L207 it clearly states:
}
It seems that the
IndexServerAddressis not updated to my own private repo.However
self.client._auth_configsreturns what seems to be the proper conf.JamesStewy commentedon Dec 22, 2014
I had the same issue as well. After looking around in docker-py I found docker/docker-py#241. The solution found was to add
/v1/to the registry address. You can do this in two ways either edit.dockercfgand change the registry address tohttps://mydomain.com/v1/or rundocker logout https://mydomain.com/and thendocker login https://mydomain.com/v1/. Both Docker and Fig work with this configuration. Tested with Docker 1.3.2, Fig 1.0.1 and Docker Registry 0.9.0.amosschallich commentedon Dec 22, 2014
This worked for me as well. Thank you for the update
cedvan commentedon Dec 26, 2014
👍
docker login https://mydomain.com/v1/workrafael commentedon Dec 29, 2014
The docker login didn't do the trick on Docker 1.4.1 and fig 1.0.1. Does anyone know about any other workaround?
JamesStewy commentedon Jan 2, 2015
@rafael adding
/v1/to the address still works for me with Docker 1.4.1. Which program (Docker or Fig) doesn't work and what error are you receiving? Also, what is the version of the Docker Registry you are trying to connect to?65 remaining items
aanand commentedon Jul 17, 2015
@tuanmh That's been fixed. Please update Compose to 1.3.3.
aanand commentedon Jul 20, 2015
If you're experiencing "HTTPS endpoint unresponsive and insecure mode isn't enabled", two things:
--allow-insecure-sslflag.--allow-insecure-sslflag.aanand commentedon Jul 23, 2015
Update: "HTTPS endpoint unresponsive and insecure mode isn't enabled" has been fixed by #1736 and released in Compose 1.4.0 RC2.
jammylee commentedon Jul 30, 2015
Hi,
I was having the same issue of docker pull working on quay.io, but docker-compose pull gives 403. I tried the /v1/ workaround and it didn't help. I have also installed docker-compose 1.4.0rc2, but still get the error:
Error: Status 403 trying to pull repository _______________: "{"error": "Permission Denied"}"
my docker version is 1.6.2, and this is in the OSX boot2docker environment.
I also tried the test.py and the script is able to return my credential without any issue.
aanand commentedon Jul 30, 2015
@jammylee what Compose version? Please try 1.3.3 if you're not already on it.
wleeper commentedon Jul 30, 2015
Just upgraded to 1.4.0RC2 and am still getting:
When I do a build. Doing a docker pull on the repository throwing the error works fine. The private repository is using artifactory. I have my permissions setup in a global .dockercfg
aanand commentedon Jul 30, 2015
@wleeper What does "when I do a build" mean? Which of the following commands work and don't work?
jammylee commentedon Jul 30, 2015
@aanand Hi, thanks for the quick reply. I tried both Compose 1.3.3 and 1.4.0rc2, but for both compose, when I try docker-compose up to pull the quay.io images specified in docker-compose.yml, or simply does docker-compose pull, I continue to get
Error: Status 403 trying to pull repository _______________: "{"error": "Permission Denied"}"
however docker pull to pull my private quay.io images works fine
JamesStewy commentedon Jul 31, 2015
Thanks @aanand, 1.4.0RC2 works for me.
ContextMediaBuilder commentedon Aug 18, 2015
I am still having this issue in 1.4.0 final with Docker 1.8.1.
Seems like a good way to put quay.io out of business. :*(
alunduil commentedon Aug 18, 2015
Perhaps this is a docker-py issue? What version of docker-py is everyone using that still experiences this issue? I'm running with docker-1.8.1, docker-py-1.3.1, and docker-compose-1.4.0 without issue.
evenfrost commentedon Aug 21, 2015
Having
Authentication is required.issue withdocker-compose upand private repository with fresh installation on Ubuntu 15.04.maybetonyfu commentedon May 25, 2016
I have the same
Authentication is requiredissue with private repository. The case is when I pull image directly from docker client it always works. However if I rundocker-compose upit sometimes promptsERROR: for my-service unauthorized: authentication required, and sometimes doesn'tctr: convert bundle paths to absolute
Add scheme before attempting URL parsing. (docker#75)