Codify

GitHub SSH Setup

Configure SSH authentication for GitHub

Configuration

codify.jsonc
[
  {
    "type": "ssh-key",
    "passphrase": "ReplacePassphraseHere"
  },
  {
    "type": "ssh-config",
    "hosts": [{
      "Host": "github.com",
      "AddKeysToAgent": true,
      "UseKeychain": true,
      "IdentityFile": "~/.ssh/id_ed25519",
      "IgnoreUnknown": "UseKeychain"
    }]
  },
  {
    "type": "ssh-add",
    "path": "~/.ssh/id_ed25519",
    "appleUseKeychain": true
  }
]

What Gets Configured

This configuration completes the SSH setup for GitHub, allowing you to push and pull changes without repeatedly entering your credentials.

The configuration will:

  • Generate a new SSH key (if it doesn't already exist)
  • Automatically load the key to the ssh-agent
  • Save the passphrase to the Apple Keychain (on macOS)
  • Configure SSH to use the key for GitHub connections

Additional Setup Required

To complete the GitHub SSH setup:

  1. Run codify apply to execute the configuration
  2. Copy the contents of your public key:
    cat ~/.ssh/id_ed25519.pub
  3. Add the public key to GitHub:

After completing these steps, git operations (clone, pull, push) over SSH should work seamlessly.

Learn More

On this page