Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ko uses https with local registry #369

Closed
misterikkit opened this issue May 27, 2021 · 0 comments · Fixed by #370
Closed

ko uses https with local registry #369

misterikkit opened this issue May 27, 2021 · 0 comments · Fixed by #370

Comments

@misterikkit
Copy link

I encountered this friction when coming up with a workaround for #368

What happened:

I wanted to use a custom base image which I built locally, so I started a local registry[1] with no TLS. In my .ko.yaml I specified the base image using my hostname (dev-jbasseri).

defaultBaseImage: dev-jbasseri:5000/base:0.1

And I got this error:

Error: failed to publish images: error building "ko://purestorage.com/harbormaster/volume/cmd/manager": Get "https://dev-jbasseri:5000/v2/": http: server gave HTTP response to HTTPS client

I re-tagged the image as localhost:5000/base:0.1 and then ko worked normally.

The --insecure-registry flag will skip TLS verification, but it will not skip TLS entirely. So maybe the correct answer here is to use a self-signed cert with my local registry.

Another perspective is that I should just use localhost instead of my hostname.

[1] docker run -d -p 5000:5000 --restart=always --name registry registry:2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant