---
updatedAt: 2026-07-29T14:27:30.000Z
agentTools:
  siteIndex: https://docs.jfrog.com/llms.txt
  projectIndex: https://docs.jfrog.com/governance/llms.txt
---

# 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](https://docs.jfrog.com/governance/docs/evidence-service-cli). 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:**

```shell
jf evd generate-key-pair
```

**Custom key generation:**

```shell
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 ​<Anchor label="admin token" target="_blank" href="/administration/docs/access-tokens#generate-admin-tokens">admin token</Anchor>​ 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

<Table align={["left","left","left","left"]}>
  <thead>
    <tr>
      <th>
        Option
      </th>

      <th>
        Required/Optional
      </th>

      <th>
        Type
      </th>

      <th>
        Description
      </th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>
        `--key-file-path`
      </td>

      <td>
        optional
      </td>

      <td>
        string
      </td>

      <td>
        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.
      </td>
    </tr>

    <tr>
      <td>
        `--key-file-name`
      </td>

      <td>
        optional
      </td>

      <td>
        string
      </td>

      <td>
        The base name for key files (without the extension):

        * Private key: `<name>.key`
        * Public key: `<name>.pub`

        The default name is `evidence`.
      </td>
    </tr>

    <tr>
      <td>
        `--key-alias`
      </td>

      <td>
        optional
      </td>

      <td>
        string
      </td>

      <td>
        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`
      </td>
    </tr>

    <tr>
      <td>
        `--upload-public-key`
      </td>

      <td>
        optional
      </td>

      <td>
        boolean
      </td>

      <td>
        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`.

        <Callout icon="📘" theme="info">
          **Note**

          Requires an admin user and a server connection.
        </Callout>
      </td>
    </tr>

    <tr>
      <td>
        `--server-id`
      </td>

      <td>
        optional
      </td>

      <td>
        string
      </td>

      <td>
        The server ID configured using the `jf config` command.
      </td>
    </tr>
  </tbody>
</Table>

<Callout icon="✅" theme="okay">
  **Tip**

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

## 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.

```shell
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.

```shell
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.

```shell
jf evd generate-key-pair --upload-public-key=false
```

<Callout icon="📘" theme="info">
  **Note**

  For more information about creating evidence using the JFrog CLI, see [Create Evidence CLI](https://docs.jfrog.com/governance/docs/create-evidence-cli).
</Callout>

## Frequently Asked Questions

Common questions about generating an evidence key pair.

<Accordion title="FAQs" icon="plus">
  ##### 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](#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](#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](#example-3-generate-key-pair-without-uploading-public-key).

  ##### 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`.
</Accordion>

## Related Topics

* [Get Evidence CLI](https://docs.jfrog.com/governance/docs/get-evidence-cli)
* [Verify Evidence CLI](https://docs.jfrog.com/governance/docs/verify-evidence-cli)