Add certificate export command for Docker registry trust - #555
Open
greghaynes wants to merge 3 commits into
Open
Add certificate export command for Docker registry trust#555greghaynes wants to merge 3 commits into
greghaynes wants to merge 3 commits into
Conversation
greghaynes
force-pushed
the
get-certificate-command
branch
from
December 18, 2025 20:47
b79001b to
d4e3f1c
Compare
Contributor
Author
|
@copilot merge in main |
Contributor
|
@greghaynes I've opened a new pull request, #557, to work on those changes. Once the pull request is ready, I'll request review from you. |
greghaynes
force-pushed
the
get-certificate-command
branch
from
December 19, 2025 16:52
d4e3f1c to
c1e4f67
Compare
Implements 'idpbuilder get certificate' command to export the self-signed TLS certificate from the cluster. This solves the Docker trust issue with the Gitea container registry without requiring a Docker daemon restart. Features: - Default: Prints certificate to stdout for flexibility - --docker flag: Exports to Docker's per-registry cert directory (~/.docker/certs.d/<registry-host>/ca.crt) - --output flag: Exports to a custom file path - Provides platform-specific instructions for system-wide trust - Works without Docker restart, avoiding cluster shutdown Includes comprehensive test coverage for certificate retrieval, file operations, registry host determination, and command flags. Signed-off-by: Greg Haynes <greg@greghaynes.net>
greghaynes
force-pushed
the
get-certificate-command
branch
from
December 19, 2025 16:53
c1e4f67 to
2b3efc3
Compare
Signed-off-by: Greg Haynes <greg@greghaynes.net>
greghaynes
force-pushed
the
get-certificate-command
branch
from
December 19, 2025 17:00
16338f9 to
42732ae
Compare
Signed-off-by: Greg Haynes <greg@greghaynes.net>
squidboylan
reviewed
Dec 21, 2025
Comment on lines
+77
to
+79
| registryHost = fmt.Sprintf("%s:%s", config.Host, config.Port) | ||
| } else { | ||
| registryHost = fmt.Sprintf("gitea.%s:%s", config.Host, config.Port) |
Contributor
There was a problem hiding this comment.
I don't think config.Host is the right variable to use here, I think config.IngressHost is more appropriate. It's not totally clear to me why we have these two config options separated but they can be out of sync and when they are IngressHost should be correct I think.
Contributor
|
This feels like something we should have an e2e test for? |
cmoulliard
reviewed
Jan 8, 2026
| Short: "Export the TLS certificate from the cluster", | ||
| Long: `Export the self-signed TLS certificate from the cluster. | ||
|
|
||
| By default, the certificate is printed to stdout. Use the --docker flag to automatically |
Contributor
There was a problem hiding this comment.
Such a command is specific to docker and will not work for podman certainly. Add then a remark or enhance the code to support to export the certificate for docker or podman
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implements 'idpbuilder get certificate' command to export the self-signed TLS certificate from the cluster. This solves the Docker trust issue with the Gitea container registry without requiring a Docker daemon restart.
Features:
Includes comprehensive test coverage for certificate retrieval, file operations, registry host determination, and command flags.