ssh bitbucket github

$ 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:...

posted on 2017-05-16 19:40  yjbjingcha  阅读(151)  评论(0编辑  收藏  举报

导航