To enable GitHub MFA visit:
https://github.com/settings/security
Don't forget to save securely your recovery codes
$ git clone [email protected]:FernandoMiguel/MFAguide.git
asks for sshkey password, unless key is unlocked
Which can be achieved with:
$ ssh-add ~/.ssh/ed25519
Enter passphrase for /Users/fernando/.ssh/ed25519:
You should keep your public sshkeys updated on GitHub
https://GitHub.com/settings/keys
You can see your keys at https://GitHub.com/YOUR-USERNAME.keys
Example: https://GitHub.com/fernandomiguel.keys
$ ssh-keygen -t ed25519
Always set a password
$ git clone https://GitHub.com/FernandoMiguel/MFAguide.git
asks for your GitHub username and a 'password'.
But since you now have MFA enabled, your web password no longer works.
Instead you must use a Personal access tokens
You can securely store that token in your keychain.
Personally I opt to use https methods, since I don't like having my sshkey unlocked.
By using https methods, code editors can more easilly interact with git repos.