Help center › Mobile app development

Use GitHub from your Mac

Three ways to clone and push: a key on the Mac, agent forwarding, or the GitHub CLI.

Option 1: a key that lives on the Mac (best for CI)

On your RunMac, over SSH:

ssh-keygen -t ed25519 -C "runmac"
cat ~/.ssh/id_ed25519.pub

Copy the line it prints. In GitHub, go to your profile picture → Settings → SSH and GPG keys → New SSH key, paste it and save. For a CI runner that only needs one repository, add it as a deploy key in that repository’s settings instead. Then test:

ssh -T git@github.com

GitHub answers “Hi USERNAME! You’ve successfully authenticated, but GitHub does not provide shell access.”

Option 2: forward the key from your own computer

Your key never leaves your computer. Add ForwardAgent yes to the RunMac entry in your computer’s ~/.ssh/config (see the SSH shortcut):

Host runmac
  HostName k7p2x9.runmac.dev
  Port 2201
  User dev
  ForwardAgent yes

Make sure your key is loaded (ssh-add -L), connect with ssh runmac, and ssh -T git@github.com on the Mac answers as you. Only turn this on for hosts you trust, never for Host *. Use SSH URLs (git@github.com:…), not HTTPS.

Option 3: the GitHub CLI

brew install gh
gh auth login

Follow the prompts; it can sign in through a one-time code you enter at github.com on your own computer.

Related

Install Xcode and simulatorsSign in with your own Apple Account, install Xcode, accept the licence, add simulators.Set up your Mac for iOS developmentThe order to do things in: connect, Xcode, your Apple Account, GitHub, then your first build.Build and test from the command linexcodebuild and the simulator over SSH: list schemes, pick a simulator, build and run tests.

Still stuck?

Signed-in customers can message us from the portal; we reply within 24 hours on business days (AEST).