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

could not parse Go build info: line 4: expected 2 columns for build setting; got 1 #651

Closed
infamousjoeg opened this issue Mar 16, 2022 · 5 comments

Comments

@infamousjoeg
Copy link

infamousjoeg commented Mar 16, 2022

I just upgraded my Go version to 1.18 and tried running ko build which failed and threw the following error:

❯ KO_DOCKER_REPO=nfmsjoeg ko build .
2022/03/15 23:20:52 Using base gcr.io/distroless/static:nonroot@sha256:80c956fb0836a17a565c43a4026c9c80b2013c83bea09f74fa4da195a59b7a99 for github.com/infamousjoeg/kubernetes-manifests/apps/k8s-secrets-app
2022/03/15 23:20:55 Building github.com/infamousjoeg/kubernetes-manifests/apps/k8s-secrets-app for linux/amd64
Error: failed to publish images: error building "ko://github.com/infamousjoeg/kubernetes-manifests/apps/k8s-secrets-app": could not parse Go build info: line 4: expected 2 columns for build setting; got 1
2022/03/15 23:20:56 error during command execution:failed to publish images: error building "ko://github.com/infamousjoeg/kubernetes-manifests/apps/k8s-secrets-app": could not parse Go build info: line 4: expected 2 columns for build setting; got 1

I installed ko using Homebrew, so I uninstalled it and reinstalled it thinking it was similar to Issue #106, however that did not solve the issue or change the error being thrown. I have confirmed that go build . does successfully build.

@imjasonh
Copy link
Member

Thanks for reporting this!

This is #625 -- you should be able to get around this with go install github.com/google/ko@main (note: not @latest), until we cut a v0.11.0 release, which should be soon.

@infamousjoeg
Copy link
Author

Thank you @imjasonh, that seems to have gotten me past that error.

It did raise another, however:

Error: failed to publish images: error publishing ko://github.com/infamousjoeg/kubernetes-manifests/apps/k8s-secrets-app: PUT https://index.docker.io/v2/nfmsjoeg/k8s-secrets-app-80251e73f499bafd2533f84946cc1c80/manifests/latest: DENIED: unknown manifest class for application/vnd.docker.container.image.v1+json
2022/03/16 08:46:45 error during command execution:failed to publish images: error publishing ko://github.com/infamousjoeg/kubernetes-manifests/apps/k8s-secrets-app: PUT https://index.docker.io/v2/nfmsjoeg/k8s-secrets-app-80251e73f499bafd2533f84946cc1c80/manifests/latest: DENIED: unknown manifest class for application/vnd.docker.container.image.v1+json

I'm happy to wait until the next release is cut, if necessary.

@imjasonh
Copy link
Member

Ah, yeah. That error is coming from some not-yet-released(-because-it's-broken) changes to have ko produce OCI images, which Dockerhub (and quay.io, and maybe others) don't like. I'll have to revert that change before releasing v0.11.

@imjasonh
Copy link
Member

https://github.com/google/ko/releases/tag/v0.11.0 🎉

@infamousjoeg
Copy link
Author

go install github.com/google/ko@main works! Thank you for this!

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

No branches or pull requests

2 participants