How do I connect my computer to GitHub and Cloudflare?
Sign in from the terminal: gh auth login connects you to GitHub and npx wrangler login connects you to Cloudflare, each by approving access in your browser.
Before that, you need the tools and accounts:
- Git, which tracks the history of your project, and a GitHub account, where projects are stored online.
- The GitHub CLI (
gh), GitHub's command-line tool, which handles the sign-in. - Node.js, which provides
npx, and a Cloudflare account with a verified email address.
Both logins use the "sign in with your browser" kind of authorization, called OAuth. You approve access on the website and the tool receives a login token, so you never copy or paste a password or key. Then check that it worked: gh auth status shows your GitHub login and npx wrangler whoami shows your Cloudflare account.
A few cautions. Only approve sign-in requests you started yourself. On a shared computer, sign out when you're done. For automated systems such as GitHub Actions, don't reuse your personal login: create a separate API token with only the permissions it needs.
If something fails, read the message. "Command not found" usually means the tool isn't installed yet, or that you need to open a new terminal window.
Vumbli's Set Up Your Builder Toolkit track covers both connections, in "Git, GitHub, and signing in from your computer" and "Connect your computer to Cloudflare", and ends with a deploy from your own machine.
Start with these missions
- Your builder toolkit, in plain English (Set Up Your Builder Toolkit)
- The terminal from zero (Set Up Your Builder Toolkit)
- Read a command like a builder (Set Up Your Builder Toolkit)
Tracks that teach it
More questions, answered by building