首页 > 其他 > 详细

Git链接到GitHub

时间:2017-01-01 22:52:46      阅读:327      评论:0      收藏:0      [点我收藏+]

步骤一 注册账号及安装:

注册GitHub账号,创建repository,并学习github的guides(https://guides.github.com/activities/hello-world/

安装git,傻瓜式安装即可。(https://git-scm.com/   64位  32位

 

步骤二 配置SSH Key:

打开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

Git链接到GitHub

原文:http://www.cnblogs.com/bongQ417/p/6241616.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!