您的位置:首页 > 其它

ubuntu10.04 LTS升级git 版本

2013-07-18 08:50 387 查看
1. 源码编译升级git版本

卸载源安装git版本

$ apt-get remove git git-core

$ sudo apt-get install libcurl4-gnutls-dev libexpat1-dev gettext libz-dev libssl-dev libssl-dev asciidoc docbook2x

$ git clone git://git.kernel.org/pub/scm/git/git.git

$ cd git

$ git checkout v1.8.2.2

$ echo v1.8.2.2 > version

$ make prefix=/usr all doc info

$ sudo make prefix=/usr install

$ which git

/usr/bin/git

$ git --version

git version 1.8.2.2

2. ubuntu下apt-get 升级git

使用git提交github工程的时候,

报错:

Error: The requested URL returned error: 403 while accessing

# fatal: HTTP request failed

查看官方的指南:

https://help.github.com/articles/https-cloning-errors

结果发现git版本为1.7.4,(git --version)而官方提示必须是1.7.10及以后版本

升级

增加ppa

sudo apt-add-repository ppa:git-core/ppa

sudo apt-get update

sudo apt-get install git

如果本地已经安装过Git,可以使用升级命令:

sudo apt-get dist-upgrade
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: