CentOS 5安裝GIT的基本命令

來源:互聯網
上載者:User
最近在研究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://git-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,就可以解決問題~~~
相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.