To push code from your local machine to GitHub, Git must authenticate your identity. In August 2021, GitHub permanently removed support for plain account passwords when authenticating Git operations over HTTPS. Today, you must authenticate using either SSH Keys (recommended) or Personal Access Tokens (PAT).
1. Why Password Authentication Was Deprecated
Plain text passwords suffer from major security flaws:
They can be intercepted, shoulder-surfed, or phished.
A leaked password grants full access to your entire GitHub account.
They cannot be easily scoped or set to expire automatically.
Modern Solutions:
1
SSH (Secure Shell) Keys: Cryptographic public/private key pairs. Zero passwords to type; permanently secure and lightning fast.
2
Personal Access Tokens (PAT): Scoped, revocable alphanumeric strings used as password replacements over HTTPS.
2. Generating and Configuring SSH Keys (Recommended)
SSH uses asymmetric public-key cryptography. You keep the private key secret on your laptop, and upload the public key (.pub) to GitHub.
Step 1: Check for Existing SSH Keys
1ls-al ~/.ssh
2# Look for id_ed25519 or id_rsa
Step 2: Generate a Modern Ed25519 Key Pair
The Ed25519 algorithm is faster and more secure than legacy RSA:
1ssh-keygen -t ed25519 -C"sumit@mskinstitute.com"
Press Enter to accept the default file location (~/.ssh/id_ed25519).
Enter a passphrase for extra local security (or press Enter for no passphrase).