好久沒有拉取過項目了 ,都快忘了怎么用了
今天用gitbash拉取分支的時候遇到了
fatal: Could not read from remote repository.
因為新公司的電腦上沒有裝ssh,
搞一下,感謝http://blog.csdn.net/i_peter/article/details/62418911
Windows下打開Git Bash,創(chuàng)建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