<!-- WARNING: This documentation is auto-generated from the confluentinc/cli repository and should not be manually edited. -->

<a id="confluent-secret-file-encrypt"></a>

# confluent secret file encrypt

## Description

This command encrypts the passwords in the file specified by `--config-file`. This command fails if a master key has not been set in the environment variable `CONFLUENT_SECURITY_MASTER_KEY`. Create a master key using `confluent secret master-key generate`.

```none
confluent secret file encrypt [flags]
```

## Flags

```none
--config-file string           REQUIRED: Path to the configuration properties file. File extension must be one of ".json" or ".properties" (key=value pairs).
--local-secrets-file string    REQUIRED: Path to the local encrypted configuration properties file.
--remote-secrets-file string   REQUIRED: Path to the remote encrypted configuration properties file.
--config string                List of configuration keys.
```

## Global Flags

```none
-h, --help            Show help for this command.
    --unsafe-trace    Equivalent to -vvvv, but also log HTTP requests and responses which might contain plaintext secrets.
-v, --verbose count   Increase verbosity (-v for warn, -vv for info, -vvv for debug, -vvvv for trace).
```

## See Also

* [confluent secret file](index.md#confluent-secret-file) - Secure secrets in a configuration properties file.
