4

I want to use delegates with DOCKER CONTENT TRUST. I generated the delegate.crt/key on the collaborator's machine and now I am trying to rotate the snapshot key with:

notary key rotate localhost:5000/ubuntu snapshot -r

=> Error: unknown shorthand flag: 'r' in -r
Usage:
  notary key rotate [ GUN ] [flags]

Why am I getting this error?

2 Answers 2

8

Had "unknown shorthand flag: 'r' in -rm" error but due bad argument, not that I wanted delegation.

Was:

$ docker run -rm busybox echo hello world 

Causing:

unknown shorthand flag: 'r' in -rm

The correct parameter is --rm two dashes.

$ docker run --rm busybox echo hello world 

the --rm flag that can be passed to docker run which automatically deletes the container once it's exited from.

Source: https://github.com/prakhar1989/docker-curriculum#11-docker-run

0

(Disclaimer: I know zilch about Docker Notary, so this might be completely bogus)

According to the Notary documentation:

The root and targets key must be locally managed - to rotate either the root or targets key, for instance in case of compromise, use the notary key rotate command without the -r flag. The timestamp key must be remotely managed - to rotate the timestamp key use the notary key rotate timestamp -r command.

So I'd guess you're trying to use a non-locally managed root or targets key which apparently is not supported.

3
  • Worked without the flag but I receive another error now: " " when:
    – BiltiuLena
    Oct 14, 2016 at 8:45
  • >notary delegation add localhost:5000/ubuntu targets/releases delegation.crt --all-paths => Error: unknown command "delegation" for "notary"
    – BiltiuLena
    Oct 14, 2016 at 8:45
  • but I found that it's about the notary client version. Thank you for your replay!
    – BiltiuLena
    Oct 14, 2016 at 9:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.