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?

Leonardo Dagnino
  • 2,914
  • 7
  • 28
BiltiuLena
  • 93
  • 1
  • 2
  • 8

2 Answers2

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

hthetiot
  • 359
  • 4
  • 8
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.

Frank Schmitt
  • 30,195
  • 12
  • 73
  • 107