Open rajeev-0 opened 6 months ago
Can you try prepending ./
to payload.json as a workaround?
also, that error message is (incorrectly) printed if the argument to --artifact
doesn't exist, so can you please also verify the filename?
prepending ./
also doesn't work, Just got added to error message.
$ rekor-cli upload --artifact ./payload.json --signature payload.json.sig --public-key pubkey.pem --pki-format x509
Error: invalid argument "./payload.json" for "--artifact" flag: './payload.json' is not a valid url
And I also confirmed that file payload.json
exists.
$ cat payload.json
{"critical":{"identity":{"docker-reference":"cr.example.com/ranjan.rajeev/test-container/hello-world"},"image":{"docker-manifest-digest":"sha256:8d3b740ac4f8c8d84d71b67e18127cd380d6e224956f2daa5d99f28a9fad155a"},"type":"cosign container image signature"},"optional":null}
prepending
./
also doesn't work, Just got added to error message.$ rekor-cli upload --artifact ./payload.json --signature payload.json.sig --public-key pubkey.pem --pki-format x509
Error: invalid argument "./payload.json" for "--artifact" flag: './payload.json' is not a valid url
And I also confirmed that file
payload.json
exists.$ cat payload.json
{"critical":{"identity":{"docker-reference":"cr.example.com/ranjan.rajeev/test-container/hello-world"},"image":{"docker-manifest-digest":"sha256:8d3b740ac4f8c8d84d71b67e18127cd380d6e224956f2daa5d99f28a9fad155a"},"type":"cosign container image signature"},"optional":null}
I'm only able to recreate this error if the file doesn't exist in the current working directory. Can you confirm that is the case for you?
Description I want to use rekor-cli version 1.3.6 for uploading artifact and signature using below command.
$ rekor-cli upload --artifact payload.json --signature payload.json.sig --public-key pubkey.pem --pki-format x509
But I am getting invalid argument error.invalid argument "payload.json" for "--artifact" flag: URL must be for http or https scheme
.In help section it states it could be a file.
--artifact fileOrURL path or URL to artifact file
Version rekor-cli: Rekor CLI
GitVersion: v1.3.6 GitCommit: a6788566cd62facb0fb0450e9d2c2867f551e37c GitTreeState: clean BuildDate: 2024-04-02T04:16:36Z GoVersion: go1.21.8 Compiler: gc Platform: linux/amd64