赞
踩
ls -al ~/.ssh
ssh-keygen -t rsa -b 4096 -C "your_github_email@example.com" -f ~/.ssh/id_rsa_github
ssh-keygen -t rsa -b 4096 -C "your_gitlab_email@example.com" -f ~/.ssh/id_rsa_gitlab
eval "$(ssh-agent -s)"
ssh-add -K ~/.ssh/id_rsa_github
ssh-add -K ~/.ssh/id_rsa_gitlab
# 新建和打开config文件
touch ~/.ssh/config
open -e ~/.ssh/config
# GitHub配置
Host github.com
HostName github.com
User git
IdentityFile ~/.ssh/id_rsa_github
# GitLab配置
Host gitlab.com
HostName gitlab.com
User git
IdentityFile ~/.ssh/id_rsa_gitlab
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。