adding support for export of private gpg key (#22557)

This PR allows users to `--export`, `--export-secret`, or both to  export GPG keys
from Spack. The docs are updated that include a warning that this usually does not
need to be done.

This addresses an issue brought up in slack, and also represented in #14721.

Signed-off-by: vsoch <vsoch@users.noreply.github.com>

Co-authored-by: vsoch <vsoch@users.noreply.github.com>
This commit is contained in:
Vanessasaurus
2021-05-29 00:32:57 -06:00
committed by GitHub
parent f6febd2ef5
commit 6f534acbef
6 changed files with 117 additions and 14 deletions

View File

@@ -1010,7 +1010,7 @@ _spack_gpg_sign() {
_spack_gpg_create() {
if $list_options
then
SPACK_COMPREPLY="-h --help --comment --expires --export"
SPACK_COMPREPLY="-h --help --comment --expires --export --export-secret"
else
SPACK_COMPREPLY=""
fi
@@ -1027,7 +1027,7 @@ _spack_gpg_init() {
_spack_gpg_export() {
if $list_options
then
SPACK_COMPREPLY="-h --help"
SPACK_COMPREPLY="-h --help --secret"
else
_keys
fi