Contributing Code Anonymously
This guide covers the coding setup after you create your anonymous GitHub account.
This setup helps make sure your anonymous repositories do not leak your real name, email address, or SSH key, and that commits are signed with your anonymous identity.
If you do not set up this SSH configuration, GitHub may bam your new account, because it sees that you’re using the same series of SSH key attempts across multiple accounts when pushing commits.
Do not:
- ❌ Put anonymous identity information in global
~/.gitconfig. - ❌ Reuse your regular SSH key. Generate a dedicated key for this account.
- ❌ Paste your private key anywhere. Share only the public key (
.pub). - ❌ Use GitHub CLI for this account setup (it can default to your primary account).
-
Generate a dedicated SSH key
Option A (recommended): Generate an SSH key pair in 1Password if you use it. Follow 1Password’s docs to generate a key, enable the SSH agent, and enable Git commit signing.
Option B: Generate and load a key manually:
Terminal window ssh-keygen -t ed25519 -C "github_ac" -f ~/.ssh/github_aceval "$(ssh-agent -s)"ssh-add ~/.ssh/github_ac -
Add the key to your GitHub account
-
Copy your public key:
Terminal window cat ~/.ssh/github_ac.pub -
In GitHub, open Settings -> SSH and GPG keys and add the key as an SSH authentication key.
-
On the same page, add the same public key again as a signing key.
-
-
Set up your SSH config
Add one of these blocks to
~/.ssh/config:## OPTION A: If you use 1Password for your SSH keysHost github.com-acHostName github.comUser gitIdentityAgent "~/Library/Group Containers/2BUA8C4S2C.com.1password/t/agent.sock"IdentityFile ~/.ssh/github_ac.pubIdentitiesOnly yes## OPTION B: If you are using a regular SSH keyHost github.com-acHostName github.comUser gitIdentityFile ~/.ssh/github_acIdentitiesOnly yes -
Configure your repository’s local Git identity
Edit your repository’s local
.git/config. Do not put this in global~/.gitconfig.Replace
YOUR_NEW_ANONYMOUS_EMAILandYOUR_NEW_ANONYMOUS_USERNAMEwith your anonymous email and username.Update
YOUR_NEW_ANONYMOUS_USERNAME/ActivistChecklist.gitwith your fork of the repo.[user]email = YOUR_NEW_ANONYMOUS_EMAILname = YOUR_NEW_ANONYMOUS_USERNAME[user]signingkey = ssh-ed25519 AAAACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx[gpg]format = ssh# Uncomment the next 2 lines if you use 1Password for SSH signing#[gpg "ssh"]# program = "/Applications/1Password.app/Contents/MacOS/op-ssh-sign"[commit]gpgsign = true[remote "origin"]url = git@github.com-ac:YOUR_NEW_ANONYMOUS_USERNAME/ActivistChecklist.gitfetch = +refs/heads/*:refs/remotes/origin/*[branch "main"]remote = originmerge = refs/heads/mainvscode-merge-base = origin/mainFor
signingkey, copy the full contents of your public key file (~/.ssh/github_ac.pub). Never use your private key. -
Update your remote to use the SSH alias
Terminal window cd PATH_TO_REPOgit remote remove origingit remote add origin git@github.com-ac:YOUR_NEW_ANONYMOUS_USERNAME/ActivistChecklist.gitgit remote -v# Should show github.com-ac, not github.com or https://ssh -T git@github.com-ac# Should say "successfully authenticated" -
Test the setup
Make a test commit to verify your identity and signing setup:
Terminal window git checkout -b feature/test-commitgit commit -am "Test commit"git log# Verify author name and email are your anonymous onesgit push -u origin feature/test-commitThen open the repository in your browser and confirm the commit shows up under your anonymous account.