gitHub是一个面向开源及私有软件项目的托管平台,因为只支持git 作为唯一的版本库格式进行托管,故名gitHub。
检查已存在的SSH key
- 打开Git Bash
- 输入
cd ~/.ssh
ls
- 检查/.ssh目录来查看是否存在公开的ssh key
生成一个新的SSH key并添加到ssh-agent
打开Git Bash
然后为ssh key设置密码:(
为你的github账号添加SSH key
- 前往 GitHub 网站的”account settings”,依次点击”Setting -> SSH Keys”->”New SSH key”
- title随填写,key处拷贝 ~/.ssh/id_rsa.pub 中的内容 测试你的SSH连接
- 打开Git Bash
- 输入
ssh -T git@github.com
- 看到如下提示时:
Hi longfeizheng! You've successfully authenticated, but GitHub does not provide shell access.