Skip to main content


Status - ttps://

Command palette (Command+K) -

Code search:

Locking down your GitHub-hosted Domains -

Desktop app: -

View raw commit/patch: add .patch to the commit URL, eg

List of cool features of Git and GitHub -

Hub CLI -


Doing ssh -T should say:

Hi AlbertVilaCalvo! You've successfully authenticated, but GitHub does not provide shell access.

Doing cat ~/.ssh/config should show:

Host *
AddKeysToAgent yes
UseKeychain yes
IdentityFile ~/.ssh/github_personal

Multiple SSH keys (for different GitHub accounts) on the same computer

Eg if we have a work GitHub account and want to commit on a personal repository on the work computer.

Resources followed:

Here I assume that I already have the SSH setup for the work GitHub account.

Note that this approach does not use add multiple entries to the ~/.ssh/config file. It's for specific repositories. It has the advantage that you don't need to change how you git clone a repository.

Create the new SSH key for the personal account: ssh-keygen -t rsa -C "" -f github_personal

Copy with pbcopy < and add it at the GitHub website at

Add the SSH to keychain permanently with ssh-add github_personal. You'll need to type the passphrase. It will say "Identity added: github_personal ("

Update: to avoid the error "ERROR: Permission to AlbertVilaCalvo/XYZ.git denied to AlbertWork. fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists." I've had to add this line to the ~/.zshrc: ssh-add --apple-use-keychain ~/.ssh/github_personal.

Clone the personal repository you want to contribute to. If you get the error "Please make sure you have the correct access rights and the repository exists", clone the repo with a specific SSH key with GIT_SSH_COMMAND="ssh -i ~/.ssh/github_personal" git clone source

Once the repo is cloned, configure it to use the personal SSH key: git config core.sshCommand 'ssh -i ~/.ssh/github_personal'. I took this from

Important: don't forget to set the personal email on that repository, otherwise the work account will appear as a contributor on the personal repository: git config --local

Hide personal email address


Change the author of the last commit with git commit --amend --reset-author.

Check "Block command line pushes that expose my email" in

To change the email for a particular repository (not globally), go to, copy the GitHub-provided noreply email address and then do:

git config "{ID}+{username} "

You can check the current email with git config [--global]


Trending repositories this week:

Alternatives (from


Press ? to view the shortcuts.

Browse code in web editor