红帽5.x版本安装和使用方法:
1、shell中键入如下代码:
rpm -ivh http://dl.fedoraproject.org/pub/epel/5/i386/epel-release-5-4.noarch.rpm
2、修改 /etc/yum.repos.d/epel.repo 中的所有的enabled = 1
vim /etc/yum.repos.d/epel.repo
3、安装git,shell中键入如下命令,一直Y就OK
yum install git
4、远程github使用之ssh配置:输入
ssh-keygen-t rsa -C "your_email@youremail.com"
Generating public/private rsa key pair.
Enter file in which to save the key (/root/.ssh/id_rsa):
注:输入的邮箱地址和密码在远程提交程序时要用,路径使用默认路径(
(/root/.ssh/id_rsa)
)输入密码时注意一定要记住输入的密码,后面远程连接仓库的时候要使用的!!!
5、打开github网站,将~/.ssh/id_rsa.pub文件的内容粘贴到图中的位置
5.1 点击红色区域=>点击Settings=>SSH and GPG keys
5.2 点击new SSH key按钮
5.3 将~/.ssh/id_rsa.pub的内容填写到红色区域中!点击Add SSH Key按钮
6、配置用户名和邮箱,因为远程提交github需要记录你的信息
git config --global user.name "your name"
git config --global user.email "your_email@youremail.com"
7、进入到本地项目目录,将远程库添加到本地
git remote add origingit@github.com:yourName/yourRepo.git
yourname和yourRepo.git是你的远程库。
8、上传到github:
git push origin maste
git配置和使用