even typing on someone else's keyboard connected with your system can compromise passwords and other important credentials, connecting a usb cable to the system can do that, downloading some unknown program from the internet and trusting it blindly can do that.
having similar passwords is also bad as when one gets compromised, the others are easy to guess. randomly generated passwords stored in some password manager like pass are usually better.
providing someone ssh access to your system is a bad idea, never do that at any cost, unless the system isn't yours but a shared server or something. typing passwords on camera is bad, they might be shown as plaintext and once it's recorded, it's there. infact typing password in front of someone is also not suggested, the person might track your key presses, or look at the screen and read it (plaintext), or record it with some hidden camera.
cameras are bad, they record everything and if someone is able to get access to it, they can basically go frame by frame over your keyboard to see what keys you type on the password prompt.
data at rest should be encrypted, so your ssh & gpg keys should have a strong password, data in git repositories should be encrypted, be it public or private, it just takes a bug in the systems, the next day everything might be public.
don't rely on just one git service provider, you can easily configure git repositories to push to multiple remotes when you press git push. that's important because assuming that a git service provider would be there forever is a bad idea. they might block you for any silly reason and if you don't have multiple remotes setup, you just lost access to your data.