Skip to main content

add_key_from_path

Function add_key_from_path 

Source
pub fn add_key_from_path(
    path: &str,
    name: Option<&str>,
    quiet: bool,
) -> Result<(), Error>
Expand description

Imports a PGP key from a file path into the local keyring.

If name is provided, it is used as the key’s name in the store. Otherwise, the file stem of the path is used.

§Errors

Returns an error if the key file does not exist or cannot be read.