注册GitHub账号,创建repository,并学习github的guides(https://guides.github.com/activities/hello-world/)
安装git,傻瓜式安装即可。(https://git-scm.com/ 64位 32位)
打开git bash,输入如下命令一直回车即可,就会生成免登密钥。
ssh -keygen -t rsa -C your_email@example.com
然后拷贝id_rsa.pub全部内容到GitHub->Setting->SSH and GPG keys。
注:windows7在C:\Users\XXX\.ssh目录下可以找到id_rsa.pub
然后在git bash里输入如下命令
ssh –T git@github.com
如果提示”Hi XXX! You‘ve successfully authenticated, but GitHub does not provide sl access.”表示链接成功
打开git bash,输入如下命令:
git config --global user.name "YOUR NAME" git config --global user.email "YOUR EMAIL ADDRESS"
然后按照第一步创建的hello-wolrd工程,把工程下载到本地就大功告成了。
git clone git@github.com:XXX/hello-world.git
其他命令请参考Git基础学习
1. 上述均参考于https://help.github.com/的【Set Up Git】和【Create A Repo】
2. ssh key 配置:https://help.github.com/articles/generating-an-ssh-key/
3. 其他github链接博客:http://www.cnblogs.com/plinx/archive/2013/04/08/3009159.html
原文:http://www.cnblogs.com/bongQ417/p/6241616.html