Fix: gpg is used instead gpg2, GIT_AUTHOR_NAME was wrong
This commit is contained in:
parent
c5e6962ef9
commit
ea34261619
@ -4,8 +4,8 @@
|
|||||||
There you go
|
There you go
|
||||||
```
|
```
|
||||||
git clone
|
git clone
|
||||||
dc idmgr
|
cd idmgr
|
||||||
eval "$( bin/idmgr shell)"
|
eval "$( $PWD/bin/idmgr shell)"
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -75,7 +75,7 @@ idm_gpg__ls ()
|
|||||||
lib_id_is_enabled $id || return 0
|
lib_id_is_enabled $id || return 0
|
||||||
|
|
||||||
{
|
{
|
||||||
gpg --list-keys 2>/dev/null \
|
gpg2 --list-keys 2>/dev/null \
|
||||||
|| true
|
|| true
|
||||||
} | sed 's/^/ /' #| lib_log DUMP -
|
} | sed 's/^/ /' #| lib_log DUMP -
|
||||||
}
|
}
|
||||||
@ -91,7 +91,7 @@ idm_gpg__new ()
|
|||||||
}
|
}
|
||||||
|
|
||||||
idm_gpg_cli_helper $id sub
|
idm_gpg_cli_helper $id sub
|
||||||
gpg --edit-key $key addkey
|
gpg2 --edit-key $key addkey
|
||||||
|
|
||||||
lib_log NOTICE "Your subkey $name is ready :)"
|
lib_log NOTICE "Your subkey $name is ready :)"
|
||||||
}
|
}
|
||||||
@ -142,7 +142,7 @@ idm_gpg__init ()
|
|||||||
)
|
)
|
||||||
|
|
||||||
# Generate key
|
# Generate key
|
||||||
gpg --batch --gen-key $IDM_DIR_CACHE/gpg_gen_$id
|
gpg2 --batch --gen-key $IDM_DIR_CACHE/gpg_gen_$id
|
||||||
#gpg --verbose --batch --gen-key $IDM_DIR_CACHE/gpg_gen_$id
|
#gpg --verbose --batch --gen-key $IDM_DIR_CACHE/gpg_gen_$id
|
||||||
#echo $?
|
#echo $?
|
||||||
#gpg --gen-key
|
#gpg --gen-key
|
||||||
@ -172,8 +172,8 @@ idm_gpg__del ()
|
|||||||
#lib_log WARN "Do you really want to destroy the '$key' key?"
|
#lib_log WARN "Do you really want to destroy the '$key' key?"
|
||||||
#idm_cli_timeout 1 || rc=$?
|
#idm_cli_timeout 1 || rc=$?
|
||||||
|
|
||||||
gpg --delete-key "$key" || true
|
gpg2 --delete-key "$key" || true
|
||||||
gpg --delete-secret-key "$key" || true
|
gpg2 --delete-secret-key "$key" || true
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -309,7 +309,7 @@ lib_gpg_is_valid_recipients() {
|
|||||||
|
|
||||||
# All the keys ID must be valid (the public keys must be present in the database)
|
# All the keys ID must be valid (the public keys must be present in the database)
|
||||||
for gpg_id in "${recipients[@]}"; do
|
for gpg_id in "${recipients[@]}"; do
|
||||||
gpg --list-keys "$gpg_id" &> /dev/null
|
gpg2 --list-keys "$gpg_id" &> /dev/null
|
||||||
if [[ $? != 0 ]]; then
|
if [[ $? != 0 ]]; then
|
||||||
lib_log ERR "${gpg_id} is not a valid key ID."
|
lib_log ERR "${gpg_id} is not a valid key ID."
|
||||||
return 1
|
return 1
|
||||||
@ -322,7 +322,7 @@ lib_gpg_is_valid_key() {
|
|||||||
recipients=($@)
|
recipients=($@)
|
||||||
# At least one private key must be present
|
# At least one private key must be present
|
||||||
for gpg_id in "${recipients[@]}"; do
|
for gpg_id in "${recipients[@]}"; do
|
||||||
gpg --list-secret-keys "$gpg_id" &> /dev/null
|
gpg22 --list-secret-keys "$gpg_id" &> /dev/null
|
||||||
if [[ $? = 0 ]]; then
|
if [[ $? = 0 ]]; then
|
||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
|
|||||||
@ -40,7 +40,7 @@ idm_id__enable()
|
|||||||
[ -f "$conf" ] && source "$conf"
|
[ -f "$conf" ] && source "$conf"
|
||||||
|
|
||||||
echo "export SHELL_ID=${id}"
|
echo "export SHELL_ID=${id}"
|
||||||
echo "export GIT_AUTHOR_NAME=${id}"
|
echo "export GIT_AUTHOR_NAME=${common_name:-$id}"
|
||||||
echo "export GIT_AUTHOR_EMAIL=${email}"
|
echo "export GIT_AUTHOR_EMAIL=${email}"
|
||||||
|
|
||||||
# echo "export PATH=${XDG_OPT_HOME}/bin:$PATH"
|
# echo "export PATH=${XDG_OPT_HOME}/bin:$PATH"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user