Skip to content

Support for registries with self-signed certificates #868

Closed

Description

@sudiptosarkar

Description

I'm trying to publish to my own (Harbor) registry, which has a self-signed certificate. I have my CA root certificate, but there's no way to add that to this action. Can we please add this support?

Here's the error I get in my Github action runs:

Error: Error response from daemon: Get "https://registry.x-force.int/v2/": tls: failed to verify certificate: x509: certificate signed by unknown authority

Also, I'd greatly appreciate any workaround in the meantime as I'm blocked on this...

Activity

  1. crazy-max commented on May 16, 2025

    @crazy-max
    Member

    This action is just a wrapper around docker login and does not trust self-signed certificates by default. If you're using a GitHub public runner you can have a step before the login one that copies the self-signed cert to /etc/docker/certs.d/registry.x-force.int/ca.crt and restart docker with systemctl restart docker.

    As runners have a hard dependency on the docker engine to startup service containers, we shouldn't have to manage certificates and interact with docker systemd unit as it would have unattended behavior if services are setup.

  2. locked and limited conversation to collaborators on May 16, 2025
  3. converted this issue into a discussion #869 on May 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions