-
-
Save shuiRong/2363ff26775da5247a7d79c3f6b72656 to your computer and use it in GitHub Desktop.
github ssh 多账号配置
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
创建新的SSH key | |
ssh-keygen -t rsa -C "your-email-address" | |
config文件的内容如下: | |
#Default GitHub | |
Host github.com | |
HostName github.com | |
User one | |
IdentityFile ~/.ssh/id_rsa | |
Host github-second | |
HostName github.com | |
User javashop | |
IdentityFile ~/.ssh/id_rsa_second | |
如何使用 | |
``` | |
git remote rm origin | |
git remote add origin git@javashop.github.com:javashop/HiZoom.git | |
git@[config.hostname]:[config.username]/[github项目地址] | |
``` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment