GitHub Remotes and Auth¶
Remote Basics¶
A remote is a named link to another copy of the repository, usually on GitHub.
After the upstream is set, normal pushes are simple:
HTTPS and SSH¶
| Method | Notes |
|---|---|
| HTTPS | Common, works well with credential helpers and tokens |
| SSH | Useful for frequent GitHub use and key-based authentication |
Authentication Habits¶
- Never paste a personal access token into a repo file.
- Treat tokens like passwords.
- Give tokens the smallest permission scope possible.
- Rotate tokens if a machine is lost, shared, or compromised.