#create new SSH key:
cd ~/.ssh
ssh-keygen -t rsa -C "stddup@gmail.com"
# set alias id_rsa_xwartz
Enter file in which to save the key (/c/Users/Administrator/.ssh/id_rsa): id_rsa_xwartz
#add to SSH agent
ssh-add ~/.ssh/id_rsa_xwartz
#edit ~/.ssh/config
Host xwartz.github.com
HostName github.com
User git
IdentityFile ~/.ssh/id_rsa_xwartz
#add SSH key to github
~/.ssh/id_rsa_xwartz.pub
#check
ssh -T git@xwartz.github.com
配置之后
修改仓库的地址为相应的Host就好 repo/.git/config