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 installautoconf
//安装git
wgethttp://www.codemonkey.org.uk/projects/git-snapshots/git/git-latest.tar.gztarxzvf git-latest.tar.gz
cdgit-{date} //如果此命令不行,就找到对应的文件夹
autoconf
./configure--with-curl=/usr/local
make
makeinstall
在执行命令:
git clone https://git-wip-us.apache.org/repos/asf/incubator-cloudstack.git
出现错误:
fatal: Unable to find remote helper for 'https'
使用命令:
git config [--global] user.name 设置用户名
git config [--global] user.email 设置邮箱
git config [--global] core.editor 设置编辑器
git config [--global] github.user 设置github帐号名
git config [--global] github.token 设置github的token
--global是对当前系统用户的全局设置,在~/.gitconfig中。对系统所有用户进行配置,/etc/gitconfig。对当前项目,.git/config
解决办法:
1.安装依赖包:
yum install -y curl curl-devel
如果失败,需要查找git-core文件后,将git-core文件的路径加入到PATH路径中:
# find / -namegit-core
/usr/local/libexec/git-core
/usr/local/share/git-core
# export PATH=/usr/local/libexec/git-core:$PATH
重新在安装GIT,就可以解决问题~~~
页:
[1]