Add machine id to ssh key name

This commit is contained in:
Melora Hugues 2023-09-23 14:12:12 +02:00
parent ff00da29c1
commit b8047e39da

View file

@ -55,7 +55,7 @@ configure_git_access() {
fi
key_val="$(cat "$HOME"/.ssh/"${used_key}".pub)"
key_name="$USER-$(cat /etc/hostname)"
key_name="$USER-$(cat /etc/hostname)-$(cat /etc/machine-id)"
key_body="{\"key\":\"$key_val\",\"read_only\":false,\"title\":\"$key_name\"}"
display_step "Posting public key to gitea API"
curl -f -S -o /dev/null -X 'POST' \