先安装git
yum install git
发现报错了
Error: Package: git-1.7.12.4-1.el5.rf.x86_64 (rpmforge) Requires: libcurl.so.3()(64bit) You could try using --skip-broken to work around the problem You could try running: rpm -Va --nofiles --nodigest
网上找了解决方法,有个冲突了,运行如下命令
yum install git --disablerepo=rpmforge
再运行安装GIT命令
安装成功后输入如下命令检查下git的版本号
git --version
然后继续拉取私有仓库的代码,又报错了
Initialized empty Git repository in XXXXX fatal: XXXXX/info/refs not found: did you run git update-server-info on the server?
然后网上找了个public的仓库,发现能正常拉取,网上搜了一波,正确拉取私有仓库的姿势如下(这里拉取https的):
//假如GIT地址为 https://XXX.com/aaaa.git git clone https://你的GIT用户名@XXX.com/aaaa.git //然后会出现提示输入密码,输入正确的密码后就可以了