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

Clone Succeeded, Checkout Failed #305

Closed
gkgkgkgk opened this issue Nov 25, 2018 · 4 comments
Closed

Clone Succeeded, Checkout Failed #305

gkgkgkgk opened this issue Nov 25, 2018 · 4 comments

Comments

@gkgkgkgk
Copy link

gkgkgkgk commented Nov 25, 2018

When using RUN go get -d -v ./... in my docker file, I get the following error:

github.com/google/go-containerregistry (download)
# cd .; git clone https://github.com/google/go-containerregistry /go/src/github.com/google/go-containerregistry
Cloning into '/go/src/github.com/google/go-containerregistry'...
error: unable to create file pkg/v1/mutate/testdata/whiteout/.wh.foo.txt: Operation not permitted
fatal: unable to checkout working tree
warning: Clone succeeded, but checkout failed.
You can inspect what was checked out with 'git status'
and retry the checkout with 'git checkout -f HEAD'

Any Fixes? Thanks.

@jonjohnsonjr
Copy link
Collaborator

jonjohnsonjr commented Nov 26, 2018

Oh that's terrible. We use a whiteout file as part of a test and it looks like creating whiteout files is forbidden inside the container, so the git clone fails. A possible fix would be to create that whiteout file as part of the setup for the test so we don't have to check it in. Alternatively, using dep will prune tests (which is why I didn't catch this myself).

jonjohnsonjr added a commit to jonjohnsonjr/go-containerregistry that referenced this issue Nov 27, 2018
@gkgkgkgk
Copy link
Author

gkgkgkgk commented Nov 27, 2018

@jonjohnsonjr Thanks so much for the response.

Alternatively, using dep will prune tests (which is why I didn't catch this myself).

I use glide as my package manager for go, an I get the same error when using Glide in the Dockerfile.
How can I prevent the whiteout file from being checked in? Thanks.

@jonjohnsonjr
Copy link
Collaborator

@gkgkgkgk this should work now (I think) 👍

@gkgkgkgk
Copy link
Author

gkgkgkgk commented Dec 1, 2018

@jonjohnsonjr thanks, I'll test it out asap!

grzesiek added a commit to grzesiek/tm that referenced this issue Mar 27, 2019
Before this change `go-containerregistry` was in an old version that was
not installable with go modules inside a container. See
google/go-containerregistry#305.
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