While doing this I remembered that I had to configured Git. Many of my repositories are on GitHub and I usually sign every commit using GPG and push changes through SSH.
Here are the instructions I followed to back up and then restore my GPG & SSH keys. It could be useful if you’re moving to another computer or reinstalling operating system.
Backup
Copy both id_rsa and id_rsa.pub from ~/.ssh/ to a USB drive.
Identify the private key by executing the following command.