centos下 使用 Git

2019-09-17阅读(2971)评论(0)牵着狗狗看MM

苏州实时公交查询

先安装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
//然后会出现提示输入密码,输入正确的密码后就可以了

 

赞(1)
转载请注明来源:Web前端(W3Cways.com) - Web前端学习之路 » centos下 使用 Git
分享到: 更多 (0)