$ ssh-keygen -t rsa -C "mac"
$ vi ~/.ssh/config
Host bb
User git
HostName bitbucket.org
IdentityFile ~/.ssh/id_rsa
如果是github,则
Host github
User git
HostName github.com
IdentityFile ~/.ssh/id_rsa
$ chmod 600 ~/.ssh/config
$ chmod 600 ~/.ssh/id_rsa
在bitbucket.org添加public key
$ ssh bb
You can use git or hg to connect to Bitbucket. Shell access is disabled.
Connection to bitbucket.org closed.
如果是github,则
$ ssh github
$ git clone git@bitbucket.org:...
ssh bitbucket github
最新推荐文章于 2022-06-29 01:24:23 发布