I'm using YubiKey (PIV smart card with USB) to store my ssh credential for GitHub. Every time I access to GitHub via ssh, I need to insert the key and put pin. It's a bit stressful and I want to avoid it if it is not needed. For example, on cloning the public repo, I don't need to authenticate when I do that via https.
I can enforce git client to use ssh everywhere:
[url "[email protected]:"]
insteadOf = https://github.com/
But I do not want to enforce ssh everywhere. I want it only when authentication is needed.
Does anyone know good ways?
You can change remote url to http protocol using: git remote set-url origin http://new.git.url/here.
Documentation.
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