*Actually* fix gnupg perms

This commit is contained in:
askiiart 2023-09-01 06:58:35 -05:00
parent 53facd2ef7
commit fba184d4f8

View file

@ -93,9 +93,15 @@ else
echo Gitea URL: ${GITEA_URL}/user/settings/keys echo Gitea URL: ${GITEA_URL}/user/settings/keys
echo GitHub URL: https://github.com/settings/ssh/new echo GitHub URL: https://github.com/settings/ssh/new
fi fi
echo Fixing permissions
sudo chown -R $(whoami) /home/$(whoami)/.gnupg # From https://superuser.com/a/954639
sudo chgrp -R $(whoami) /home/$(whoami)/.gnupg # Archived at https://web.archive.org/web/20230606153856/https://superuser.com/a/954639
sudo chmod -R 600 /home/$(whoami)/.gnupg echo Fixing .gnupg/ permissions
# Set ownership to your own user and primary group
chown -R "$USER:$(id -gn)" ~/.gnupg
# Set permissions to read, write, execute for only yourself, no others
chmod 700 ~/.gnupg
# Set permissions to read, write for only yourself, no others
chmod 600 ~/.gnupg/*
read -p "Done. Now verify your SSH and GPG keys in Git*" </dev/tty read -p "Done. Now verify your SSH and GPG keys in Git*" </dev/tty