Authenticate against a GitHub Enterprise Server host.
Section: Getting Started
Authenticate to GitHub Enterprise
bash
bash
gh auth login --hostname github.example.comExplanation
Authenticate against a GitHub Enterprise Server host.
Learn the surrounding workflow
Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.
Related commands
Same sheet · prioritizing Getting Started
Authenticate interactively
Authenticate with GitHub using the default browser-based flow.
Show auth status
Show which hosts are authenticated and how credentials are stored.