I am trying to add a new SSH key to my GitHub account, but it says the key is already in use. I have hundreds of repos, and I don't want to click through each one to find out which is using this SSH key for deployments. Is there a way to automate this?
My approach to list the deploy keys (not the account-level keys) of all my repos:
for repo in `gh repo list | awk '{print $1}'`;\
do echo "==== $repo ====";\
gh repo -R $repo deploy-key list;\
done
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With