GitHub no longer accepts account passwords for Git operations over HTTPS. Use a personal access token instead.
Generate Token
- Go to GitHub Settings → Developer settings → Personal access tokens → Tokens (classic)
- Click “Generate new token”
- Select
reposcope - Generate and copy the token (you won’t see it again)
Use Token
When Git asks for password, use the token instead:
Username: your-github-username
Password: your-token-hereSave Credentials (Optional)
To avoid entering credentials every time:
# Store permanently
git config --global credential.helper store
# OR cache temporarily (15 minutes)
git config --global credential.helper cacheWarning
storesaves the token in plain text in~/.git-credentials. On shared machines, usecacheinstead.
Security Tips
- Never share your token
- Don’t commit it to repositories
- Delete unused tokens from GitHub settings
See also
- Terminal Setup: Advanced — Lazygit for a visual Git workflow