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
{{ message }}
Repository navigation
Unable to use letsencrypt certification generation #3041
Trying to use the registry with Letsencrypt builtin automatic certification generation fails with following error:
Error 403 - urn:acme:error:unauthorized - Account creation on ACMEv1 is disabled. Please upgrade your ACME client to a version that supports ACMEv2
As Letsencrypt as announced here the account creation using API v1 is impossible since November 2019. It would be good to refactor registry to use the new ACMEv2 API to create account.
Reacted by b12f, Anna Oake, Никита Конин, Nick, Sasha, Roman Deev, Vadim, Tema Smirnov, Lakhaev Andrey, NoTimeForHero and 127 more
Reacted by Gyvastis, Eduardo Burgos, Max Kosenko, Obskuro, Peng Tan, Adrian Duermael and Deniss Abramovs
In the meantime, anyone who needs to start a registry manually with Lets Encrypt... click Details:
Details
Run certbot in standalone mode to generate certificates:
$ sudo certbot certonly --standalone
...
- Congratulations! Your certificate and chain have been saved at:
/etc/letsencrypt/live/example.com/fullchain.pem
Your key file has been saved at:
/etc/letsencrypt/live/example.com/privkey.pem
...
Files inside /etc/letsencrypt/live/example.com are symlinks! So you can't just mount the domain-specific folder when starting the container.
Instead you need to mount the whole letsencrypt-folder in order to keep the symlink paths intact. Relevant options for docker run:
Note that, as usual with certbot standalone, you should also remember to add a cronjob to run certbot renew automatically.
Reacted by Eduardo Burgos, Cameron Boehmer, Gyvastis, Jonathan MASSUCHETTI, Denis Denisenko, Brandon, Alexander Veysov, Roberto Maurizzi and Dave Clark
msg="register: acme: Error 403 - urn:acme:error:unauthorized - Account creation on ACMEv1 is disabled. Please upgrade your ACME client to a version that supports ACMEv2 / RFC 8555. See https://community.letsencrypt.org/t/end-of-life-plan-for-acmev1/88430 for details."
For the devs, the probable quick fix here is to rebuild your 1.8 image with current golang libraries; I think that the library that enables Let's Encrypt has recently been updated to use the ACME 2.0 protocol and we just need to recompile against it.
To build a registry image that works, use this Dockerfile from the directory you created:
FROM registry:latest
COPY ./bin/registry /bin/registry
Trying to run that i get:
docker: Error response from daemon: OCI runtime create failed: container_linux.go:345: starting container process caused "exec: "/bin/bash": stat /bin/bash: no such file or directory": unknown.
@dorgan and @robogeek, I goofed the shell to use. I updated the docker command; it now uses /bin/sh, not /bin/bash. I verified that it works on Ubuntu 2004 on Windows, so it should behave itself on any *nix system now. You also don't need the additional mkdir and cd statements, as long as you don't mind a ./bin directory in your current dir when running the docker command.
To complete @wilminator answer: the docker container was unable to reach the DNS in my setting, so I added the --network host option, and it worked like a charm.
To recompile the registry executable, make a directory, change to it, and run this:
Hello, I've just been affected by this. As discussed above, LetsEncrypt are deprecating ACMEv1. As part of the process they're running brown-outs. I just so happened to be setting up a private docker repository when they started one.
Come on Docker! Get upgraded to ACMEv2 already!
Details
FATA[0000] create client: get directory at 'https://acme-v01.api.letsencrypt.org/directory': acme: Error 403 - urn:acme:error:serverInternal - ACMEv1 Brownout in Progress. ACMEv1 will fully turn off on June 1, 2021. Check https://letsencrypt.status.io/ for more details.
Reacted by Michael Caron, Alex Schimpf and David Rodrigue
Trying to implement the answer from @wilminator and I'm getting the following output. I know next to nothing about golang, so I'm not sure where to even begin. Any help would be greatly appreciated.
Trying to implement the answer from @wilminator and I'm getting the following output. I know next to nothing about golang, so I'm not sure where to even begin. Any help would be greatly appreciated.
@oglematt Truth be told, I'm not a golang guy either; I just make the computers work ;)
It looks like an upstream Google cloud library was updated 4 hours before your post google-cloud-go and they renamed the library. Since the go.mod configuration file for registry still uses the old name, go panics because it downloaded a module that has a different name than what it was expecting.
The devs for this project probably need to fix their requirements file to use the new name of the Google Cloud module. I have submitted a ticket #3377, and if I have time will try to offer a patch to fix it.
Everyone, I have an answer. TL,DR: If we want Docker to fix their registry image, this is the wrong place to post this. Go to registry incompatible with Let's Encrypt #96 and post there.
I did some more digging because this project has quite a few recent commits. Also, the one-liner above to launch a container to compile the registry binary shows that the project itself works fine- we get a working binary.
The problem most of us are facing is that the Docker registry image has a two year old version of the registry binary baked in, and this repo does not control that binary.
@gsaraf To fix this we need to use an issue with the main Docker GitHub repo and propose a merge into docker/distribution-library-image and hope they compile that down into a new image for us. The location this updated binary needs to get stashed is at https://github.com/docker/distribution-library-image/tree/master/amd64. However, this is the "wrong" way to fix this. The reality is that they should recompile their own source tree to fix this issue; it looks like we need to prod them to do it.
See registry incompatible with Let's Encrypt #96 and upvote like is suggested in the comments. We can also clone the repo, run their update, confirm their updated binary is ACME v2 compliant, and submit a merge request. However, I'm not holding my breath to see if their source is v2 compatible without any hacking.
A better solution would be to stop relying on this link and docker official account and just published an updated image in a new official distribution account in docker hub.
While it is convenient to just have to use image registry:2, I don't mind switching to distribution/registry:2 if I can get an up-to-date image out of the box.
Nope, why would i? I just installed certbot myself, issued certs through it and configured crontab. Problem solved on my end.
It took me an hour, but it seems you can't fix it for 3 years...
What I am saying is that only the project maintainers can decide to release a new version and publish it (which is all that is needed to fix this issue, as go 1.18 is compatible with recent acme protocol). No PR can do that for you.
The last release was built with Go 1.16, which is why it fails to generate certificate.
On my side, that make a long time that I did it myself and published it in a public repository dedicated to that single task.
@Jean-Daniel these are all fair comments. I've been trying to attend to various issues and PRs, but I agree we need more activity from maintainers. I'll be raising my voice more strongly at the next community call -- can't do more as is at the moment :-(
Activity
codeclown commentedon Jan 11, 2020
In the meantime, anyone who needs to start a registry manually with Lets Encrypt... click Details:
Details
Run certbot in standalone mode to generate certificates:
$ sudo certbot certonly --standalone ... - Congratulations! Your certificate and chain have been saved at: /etc/letsencrypt/live/example.com/fullchain.pem Your key file has been saved at: /etc/letsencrypt/live/example.com/privkey.pem ...Files inside
/etc/letsencrypt/live/example.comare symlinks! So you can't just mount the domain-specific folder when starting the container.Instead you need to mount the whole letsencrypt-folder in order to keep the symlink paths intact. Relevant options for
docker run:-e REGISTRY_HTTP_ADDR="0.0.0.0:443" \ -v /etc/letsencrypt:/etc/letsencrypt \ -e REGISTRY_HTTP_TLS_CERTIFICATE=/etc/letsencrypt/live/example.com/fullchain.pem \ -e REGISTRY_HTTP_TLS_KEY=/etc/letsencrypt/live/example.com/privkey.pem \ registry:2Note that, as usual with certbot standalone, you should also remember to add a cronjob to run
certbot renewautomatically.cameron commentedon Apr 18, 2020
Five months and not so much as peep re a documented feature that simply doesn't work as advertised? Boooo.
nikandlv commentedon May 17, 2020
Got the same issue here
wilminator commentedon Jun 27, 2020
Edit- the shell command was bad. Changed from bash to sh. Also updated cp command to keep executable bit set.
I was able to get this to work on June 25, 2020. But I had to recompile the registry binary and update the image with it.
wilminator commentedon Jun 27, 2020
For the devs, the probable quick fix here is to rebuild your 1.8 image with current golang libraries; I think that the library that enables Let's Encrypt has recently been updated to use the ACME 2.0 protocol and we just need to recompile against it.
dorgan commentedon Jul 7, 2020
Trying to run that i get:
docker: Error response from daemon: OCI runtime create failed: container_linux.go:345: starting container process caused "exec: "/bin/bash": stat /bin/bash: no such file or directory": unknown.
robogeek commentedon Sep 28, 2020
Ditto
wilminator commentedon Sep 29, 2020
@dorgan and @robogeek, I goofed the shell to use. I updated the docker command; it now uses /bin/sh, not /bin/bash. I verified that it works on Ubuntu 2004 on Windows, so it should behave itself on any *nix system now. You also don't need the additional mkdir and cd statements, as long as you don't mind a ./bin directory in your current dir when running the docker command.
robogeek commentedon Sep 29, 2020
@wilminator I did not get the /bin/bash error. Instead I got the error at the top about ACME v1.
wilminator commentedon Sep 29, 2020
@robogeek, I want to know if you tried using the stock registry image or if you tried my fix. Thanks.
robogeek commentedon Sep 29, 2020
I used registry:latest
locinus commentedon Nov 27, 2020
To complete @wilminator answer: the docker container was unable to reach the DNS in my setting, so I added the
--network hostoption, and it worked like a charm.and used the
registry:fixedimage.luc122c commentedon Jan 26, 2021
Hello, I've just been affected by this. As discussed above, LetsEncrypt are deprecating ACMEv1. As part of the process they're running brown-outs. I just so happened to be setting up a private docker repository when they started one.
Come on Docker! Get upgraded to ACMEv2 already!
Details
FATA[0000] create client: get directory at 'https://acme-v01.api.letsencrypt.org/directory': acme: Error 403 - urn:acme:error:serverInternal - ACMEv1 Brownout in Progress. ACMEv1 will fully turn off on June 1, 2021. Check https://letsencrypt.status.io/ for more details.oglematt commentedon Mar 10, 2021
Trying to implement the answer from @wilminator and I'm getting the following output. I know next to nothing about golang, so I'm not sure where to even begin. Any help would be greatly appreciated.
wilminator commentedon Mar 11, 2021
@oglematt Truth be told, I'm not a golang guy either; I just make the computers work ;)
It looks like an upstream Google cloud library was updated 4 hours before your post google-cloud-go and they renamed the library. Since the go.mod configuration file for registry still uses the old name, go panics because it downloaded a module that has a different name than what it was expecting.
The devs for this project probably need to fix their requirements file to use the new name of the Google Cloud module. I have submitted a ticket #3377, and if I have time will try to offer a patch to fix it.
4 remaining items
wilminator commentedon May 21, 2021
Everyone, I have an answer. TL,DR: If we want Docker to fix their registry image, this is the wrong place to post this. Go to registry incompatible with Let's Encrypt #96 and post there.
I did some more digging because this project has quite a few recent commits. Also, the one-liner above to launch a container to compile the registry binary shows that the project itself works fine- we get a working binary.
The problem most of us are facing is that the Docker registry image has a two year old version of the registry binary baked in, and this repo does not control that binary.
@gsaraf To fix this we need to use an issue with the main Docker GitHub repo and propose a merge into docker/distribution-library-image and hope they compile that down into a new image for us. The location this updated binary needs to get stashed is at https://github.com/docker/distribution-library-image/tree/master/amd64. However, this is the "wrong" way to fix this. The reality is that they should recompile their own source tree to fix this issue; it looks like we need to prod them to do it.
See registry incompatible with Let's Encrypt #96 and upvote like is suggested in the comments. We can also clone the repo, run their update, confirm their updated binary is ACME v2 compliant, and submit a merge request. However, I'm not holding my breath to see if their source is v2 compatible without any hacking.
Jean-Daniel commentedon May 21, 2021
A better solution would be to stop relying on this link and docker official account and just published an updated image in a new official
distributionaccount in docker hub.While it is convenient to just have to use image
registry:2, I don't mind switching todistribution/registry:2if I can get an up-to-date image out of the box.Bec-k commentedon Oct 11, 2022
Still not fixed? 3 years have passed...
milosgajdos commentedon Oct 11, 2022
Would you like to open a PR @denissabramovs ?
Bec-k commentedon Oct 11, 2022
Nope, why would i? I just installed certbot myself, issued certs through it and configured crontab. Problem solved on my end.
It took me an hour, but it seems you can't fix it for 3 years...
Jean-Daniel commentedon Oct 13, 2022
I don't think it is possible to open a PR that performs a clean compilation of the project using a recent go toolchain and publish it…
This is all that is required to fix this issue.
milosgajdos commentedon Oct 13, 2022
What are you missing in the toolchain that prevents you from doing this work @Jean-Daniel?
Jean-Daniel commentedon Oct 13, 2022
What I am saying is that only the project maintainers can decide to release a new version and publish it (which is all that is needed to fix this issue, as go 1.18 is compatible with recent acme protocol). No PR can do that for you.
The last release was built with Go 1.16, which is why it fails to generate certificate.
On my side, that make a long time that I did it myself and published it in a public repository dedicated to that single task.
tianon commentedon Oct 15, 2022
milosgajdos commentedon Oct 20, 2022
@Jean-Daniel these are all fair comments. I've been trying to attend to various issues and PRs, but I agree we need more activity from maintainers. I'll be raising my voice more strongly at the next community call -- can't do more as is at the moment :-(
olakmal commentedon Jan 23, 2023
Damn still no solution for this? 😥
bhhaskin commentedon Oct 9, 2023
Still an issue
milosgajdos commentedon Dec 20, 2023
@creekorful with the new release cut last night https://github.com/distribution/distribution/releases/tag/v3.0.0-alpha.1 would you mind taking it for a spin and test it.
milosgajdos commentedon Apr 21, 2024
Closing for the lack of noise from the OP. Feel free to reopen.