Github安装手册

本文详细介绍了如何在Linux环境下安装GitHub,并完成账号注册、公钥创建及版本提交等操作流程,帮助初学者快速掌握GitHub的基本使用。

Github安装手册

1.前言

   昨天捣鼓eclipse和ant的时候把自己改过的源代码删除了,痛定思痛,决定尝试安装一下github,有了github就可以很方便的进行代码共享和版本控制

2.安装

  [hadoop@arionvm1 hive-branch-0.10]$ sudo yum -y install git

3.注册git账号

    进入http://www.github.com/注册git账号,选择free的那个,也就是privacy为0的那个,在账户设置里面用邮箱进行激活

4.新建repository并创建公钥

选择新建一个repository,按提示输入相关内容

 

然后生成公钥

[root@arionvm1 .ssh]# ssh-keygen -t rsa -C thangool@*******

将id_rsa.pub中的内容贴到账户设置的ssh keys中

 

测试一下

[root@arionvm1 .ssh]# ssh -T git@github.com

显示Hi thangool! You've successfully authenticated, but GitHub does notprovide shell access.

 

5.提交版本

运行

[root@arionvm1 .ssh]# git config --global user.name "thangool"

[root@arionvm1 .ssh]# git config --global user.email "thangool@ict.ac.cn"

[root@arionvm1 hive-branch-0.10]# git init

[root@arionvm1 hive-branch-0.10]# git remote add origin git@github.com:thangool/my-hive.git

[root@arionvm1 hive-branch-0.10]# git add –f *

[root@arionvm1 hive-branch-0.10]# git commit -m "first commit"

[root@arionvm1 hive-branch-0.10]# git push origin master


6.查看结果

登陆https://github.com/thangool/my-hive可查看结果

评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值