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

Facing issues of go mod tidy #156

Open
soniarshika opened this issue May 1, 2024 · 3 comments
Open

Facing issues of go mod tidy #156

soniarshika opened this issue May 1, 2024 · 3 comments

Comments

@soniarshika
Copy link

soniarshika commented May 1, 2024

arsh@meAI:~$ go version
go version go1.21.9 linux/amd64

arsh@meAI:~$ cd imgcrypt/

arsh@meAI:~/imgcrypt$ make
cd cmd && go build -o ../bin/ctd-decoder -v ./ctd-decoder/
go: updates to go.mod needed; to update it:
go mod tidy
make: *** [Makefile:37: bin/ctd-decoder] Error 1

I am facing the above error whiile running make command. would appreciate if someone knows how can i resolve this?

@stefanberger
Copy link
Contributor

For me it works and our test cases running on github CI also don't run into this problem.

[stefanb@... containerd]$ cd imgcrypt/
[stefanb@... imgcrypt]$ go version
go version go1.21.9 linux/amd64
[stefanb@... imgcrypt]$ git diff
[stefanb@... imgcrypt]$ git branch
* main
[stefanb@... imgcrypt]$ make
go build -o bin/ctd-decoder -v ./cmd/ctd-decoder/
go build -o bin/ctr-enc -ldflags '-X github.com/containerd/containerd/version.Version=v1.1.10' -v ./cmd/ctr/

Is your check clean? Try git reset --hard origin/main.

@soniarshika
Copy link
Author

Yes it worked, but now after encrypting the image am unable to run this image. Facing the errror:

arsh@meAI:~/imgcrypt$ sudo ctr container create docker.io/arshika/test-repo:v5.2  arshika_image1
INFO[0000] apply failure, attempting cleanup             error="failed to extract layer sha256:3c8879ab2cf25eb049af95711715b5b99d97490ab4eedbe8d0f160f53ef5a645: read payload: read configFd: bad file descriptor\n: unknown" key="extract-356629224-sZl7 sha256:3c8879ab2cf25eb049af95711715b5b99d97490ab4eedbe8d0f160f53ef5a645"
ctr: failed to extract layer sha256:3c8879ab2cf25eb049af95711715b5b99d97490ab4eedbe8d0f160f53ef5a645: read payload: read configFd: bad file descriptor
: unknown

Also i tried running:

arsh@meAI:~/imgcrypt$ sudo ctr-enc run --rm --key mykey.pem docker.io/arshika/test-repo:v5.2  test echo 'Hello World!'
[sudo] password for arsh: 
INFO[0000] apply failure, attempting cleanup             error="failed to extract layer sha256:3c8879ab2cf25eb049af95711715b5b99d97490ab4eedbe8d0f160f53ef5a645: unable to get decryption keys in provided key path: Unknown decryption key type\n: unknown" key="extract-680227959-eVmp sha256:3c8879ab2cf25eb049af95711715b5b99d97490ab4eedbe8d0f160f53ef5a645"
ctr: failed to extract layer sha256:3c8879ab2cf25eb049af95711715b5b99d97490ab4eedbe8d0f160f53ef5a645: unable to get decryption keys in provided key path: Unknown decryption key type
: unknown

@stefanberger
Copy link
Contributor

Please provide all the command lines you are running. Otherwise it's nearly impossible to figure out what you doing.

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