主要参考 http://confluence.atlassian.com/display/BITBUCKET/Set+up+SSH+for+Git
使用 ssh-keygen 生成
不输入名称生成默认 ~/.ssh/id_rsa 等文件
输入密码 ******
ssh-add ~/.ssh/id_rsa
提示如下错误时:Could not open a connection to your authentication agent.
运行如下命令:ssh-agent bash
再执行: ssh-add ~/.ssh/id_rsa
cat ~/.ssh/id_rsa.pub 里内容 复制到bitbucket帐号 account 的 ssh-keys里
使用git push 时提示 Bad owner or permissions on ~/.ssh/config
执行:chmod 600 ~/.ssh/config