CentOS 5安装GIT的基本命令

最近在研究CloudStack的部署,从中记录一下过程:  
//先安装git依赖的包 yum install zlib-devel yum install openssl-devel yum install perl yum install cpio yum install expat-devel yum install gettext-devel

//安装autoconf yum install autoconf

//安装git wget http://www.codemonkey.org.uk/projects/git-snapshots/git/git-latest.tar.gz tar xzvf git-latest.tar.gz cd git-{date}
 //如果此命令不行,就找到对应的文件夹 autoconf ./configure –with-curl=/usr/local make make install  
在执行命令:
git
clone
https:
//gi
t

wip

us
.
apache
.
org
/repos/
asf
/
incubator

cloudstack
.
git
出现错误:
fatal: Unable to find remote helper for ‘https’  
使用命令:

git config [–global] user.name <name>        设置用户名

git config [–global] user.email <email>         设置邮箱

git config [–global] core.editor <editor>        设置编辑器

git config [–global] github.user <user>         设置github帐号名

git config [–global] github.token <token>        设置github的token

–global是对当前系统用户的全局设置,在~/.gitconfig中。对系统所有用户进行配置,/etc/gitconfig。对当前项目,.git/config

 

解决办法:

1.安装依赖包:

yum install -y curl curl-devel

如果失败,需要查找git-core文件后,将git-core文件的路径加入到PATH路径中:
[root@bogon ~]# find / -name  git-core
/usr/local/libexec/git-core
/usr/local/share/git-core
[root@bogon ~]# export PATH=/usr/local/libexec/git-core:$PATH

重新在安装GIT,就可以解决问题~~~
点赞