Update ensure-pass to clear passwords that can be repopulated automatically

This commit is contained in:
Evie Litherland-Smith 2024-12-19 11:39:54 +00:00
parent dd60d301bf
commit 8417896cef

View file

@ -6,33 +6,21 @@ secret-tool lookup email "$EMAIL" >/dev/null || (
) )
EMAIL="e.litherlandsmith@icloud.com" EMAIL="e.litherlandsmith@icloud.com"
secret-tool lookup email "$EMAIL" >/dev/null || ( secret-tool lookup clear "$EMAIL"
pass show identity/apple.com/mbsync | pass show identity/apple.com/mbsync | head -n1 | secret-tool store --label="iCloud mbsync" email "$EMAIL"
head -n1 |
secret-tool store --label="iCloud mbsync" email "$EMAIL"
)
EMAIL="evie.litherland-smith@ukaea.uk" EMAIL="evie.litherland-smith@ukaea.uk"
secret-tool lookup email "$EMAIL" >/dev/null || ( secret-tool clear email "$EMAIL"
pass show work/microsoftonline.com | pass show work/microsoftonline.com | head -n1 | secret-tool store --label="Outlook mbsync" email "$EMAIL"
head -n1 |
secret-tool store --label="Outlook mbsync" email "$EMAIL"
)
# Calendar # Calendar
URL="dav.xenia.me.uk" URL="dav.xenia.me.uk"
USER="pixelifytica" USER="pixelifytica"
secret-tool lookup url "$URL" user "$USER" >/dev/null || ( secret-tool clear url "$URL" user "$USER"
pass show "server/xenia.me.uk/$URL" | pass show "server/xenia.me.uk/$URL" | head -n1 | secret-tool store --label="Personal calendar vdirsyncer" url "$URL" user "$USER"
head -n1 |
secret-tool store --label="Personal calendar vdirsyncer" url "$URL" user "$USER"
)
# GitHub API token # GitHub API token
HOST="api.github.com" HOST="api.github.com"
USER="pixelifytica^forge" USER="pixelifytica^forge"
secret-tool lookup host "$HOST" user "$USER" >/dev/null || ( secret-tool clear host "$HOST" user "$USER"
pass show "api/$HOST" | pass show "api/$HOST" | head -n1 | secret-tool store --label="Forge GitHub Token" host "$HOST" user "$USER"
head -n1 |
secret-tool store --label="Forge GitHub Token" host "$HOST" user "$USER"
)