Skip to content

Support pushing to insecure http-only registry #4007

Closed

Description

@sipsma

User request to be able to push to http registry: https://discord.com/channels/707636530424053791/1046817210695417906/1046817210695417906

I can confirm that I get the same error but only when trying to push to a non-https registry that is not on localhost. There must be some logic buried somewhere in buildkit or its image push dependencies to not enfore https on localhost?

Either way, buildkit actually has a flag to support this during image export but for some reason I can't get it to work; when I run a locally modified test case to push to an ip on my local network then I still get the same server gave HTTP response to HTTPS client error... Code here: sipsma@4314f65

Not sure if I'm doing something wrong or if this isn't working upstream (I did notice that it doesn't appear to be tested anywhere upstream). cc @vito in case you have had to deal with this setting in the past and know any more.

Activity

  1. vito commented on Nov 28, 2022

    @vito
    Contributor

    There must be some logic buried somewhere in buildkit or its image push dependencies to not enfore https on localhost?

    Yep, I ran into similar logic for resolving, so it wouldn't surprise me if pushing followed the same rules:

    I never found a way to convince Buildkit to use plain HTTP for non-localhost addresses. 😕 This is what sent me down the path of having Bass generate TLS certs for its services (since I wanted to run a registry as a service).

    I think Buildkit's notion of "insecure" just means it doesn't verify TLS certs, not "don't use TLS."

  2. sipsma commented on Nov 30, 2022

    @sipsma
    ContributorAuthor

    Thanks @vito, the localhost part makes sense, I'm still confused though because the code seems to very heavily imply that it's trying to allow plain http here: https://github.com/sipsma/buildkit/blob/0ebdec875d2377ea493c082be46bc28b7411f5e6/util/push/push.go#L78-L78

    I asked in the buildkit slack, will update

  3. added
    area/engine
    and removed on Dec 5, 2022
  4. locked and limited conversation to collaborators on Mar 24, 2026
  5. converted this issue into a discussion #12489 on Mar 24, 2026
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

    area/engine

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions