Generate Evidence Key Pair CLI

Generate ECDSA key pairs for signing evidence with the JFrog CLI.

Description: Creates ECDSA P-256 key pairs for signing evidence. This command generates both private and public key files with secure permissions, and by default uploads the public key to the JFrog Platform for evidence verification.

Since: 2.82.0

Syntax

Basic key generation:

jf evd generate-key-pair

Custom key generation:

jf evd generate-key-pair --key-file-path <directory-path> --key-file-name <base-name> --key-alias <alias-name> --upload-public-key=<true|false>

Authentication

An ​admin token​ is required to upload the public key generated by this command (​--upload-public-key=true​​) to the JFrog Platform. This is the default setting. No authentication is required to generate the key pair ​without​ uploading the public key (​--upload-public-key=false​​). Basic authentication is not supported.

Command Parameters

OptionRequired/OptionalTypeDescription
--key-file-pathoptionalstring

The directory path for the key files. Creates the directory if it does not exist, but only one level deep.

The default is the current directory.

--key-file-nameoptionalstringThe base name for key files (without the extension):
  • Private key: <name>.key
  • Public key: <name>.pub
The default name is evidence.
--key-aliasoptionalstring

A case-sensitive name (alias) for the public key that makes it easy to identify in the JFrog Platform.

If not provided, the CLI auto-generates a timestamp-based alias using the format: evd-key-YYYYMMDD-HHMMSS

--upload-public-keyoptionalboolean

Uploads the public key to the list of trusted keys in the JFrog Platform where it can be used to verify evidence.

The default value is true.

📘

Note

Requires an admin user and a server connection.

--server-idoptionalstringThe server ID configured using the jf config command.

Tip

Use --upload-public-key=false during development and testing to generate keys locally without requiring access to the JFrog Platform.

Example 1: Basic key generation

This command creates evidence.key (private) and evidence.pub (public) in the current directory and uploads the public key to the JFrog Platform.

jf evd generate-key-pair --server-id=my-server

Example 2: Custom key names, alias, and location

This command creates my-key.key and my-key.pub in the ./keys directory with a custom alias.

jf evd generate-key-pair --key-file-path ./keys --key-file-name my-key --key-alias production-signing-key --server-id my-server

Example 3: Generate key pair without uploading public key

This command generates a key pair without uploading the public key to the JFrog Platform.

jf evd generate-key-pair --upload-public-key=false
📘

Note

For more information about creating evidence using the JFrog CLI, see Create Evidence CLI.

Frequently Asked Questions

Common questions about generating an evidence key pair.

plusFAQs
Q: How do I generate a key pair for signing evidence?

A: Run jf evd generate-key-pair to create an ECDSA P-256 private and public key pair. See Syntax for the basic and custom command forms.

Q: What do I need before uploading the public key to the JFrog Platform?

A: You need an admin token, since --upload-public-key=true (the default) uploads the key to the JFrog Platform. See Authentication.

Q: What happens if I don't set a key alias?

A: The CLI auto-generates a timestamp-based alias using the format evd-key-YYYYMMDD-HHMMSS.

Q: Can I generate a key pair without uploading the public key?

A: Yes. Set --upload-public-key=false to generate keys locally without requiring access to the JFrog Platform. See Example 3.

Q: Where are the generated key files stored by default?

A: In the current directory, using the default base name evidence (evidence.key and evidence.pub) unless you set --key-file-path or --key-file-name.

Related Topics


Did this page help you?