好久没有拉取过项目了 ,都快忘了怎么用了
今天用gitbash拉取分支的时候遇到了
fatal: Could not read from remote repository.
因为新公司的电脑上没有装ssh,
搞一下,感谢http://blog.csdn.net/i_peter/article/details/62418911
-
Windows下打开Git Bash,创建SSH Key,按提示输入密码:
$ ssh-keygen -t rsa -C "注册邮箱" -
我没有密码就直接过了,三次都是直接回车过。
-
获取key,打开.ssh下的id_rsa.pub文件,里面的内容就是key的内容
$ start ~/.ssh/id_rsa.pub -
在
github上添加生成的SSH keys -
测试ssh key是否成功,使用命令
$ssh -T git@github.com
如果出现You’ve successfully authenticated, but GitHub does not provide shell access。这就表示已成功连上github。 -
该干嘛干嘛
$ git clone yourtargeturl













网友评论