---
# System prepended metadata

title: '[GitHub] Add multiple git users with ssh keys'

---

# [GitHub] Add multiple git users with ssh keys

## Create ssh key pair for github
```sh!
cd ~/.ssh
ssh-keygen -t rsa -b 4096 -C "user@gmail.com"
ssh-add ~/.ssh/github
ssh-add -l
```
## Put the public key to github


## Setup git config
```sh!
git clone git@github.com:$GITHUB_USER/$GITHUB_REPO.git
cd $GITHUB_REPO
git init
git config user.email 'user@gmail.com'
git config credential.helper store
git config -l
```

## Reference
* https://gist.github.com/jexchan/2351996
