CentOS 5安装GIT的基本命令
生活随笔
收集整理的這篇文章主要介紹了
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 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-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,就可以解決問題~~~
//安裝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,就可以解決問題~~~
總結
以上是生活随笔為你收集整理的CentOS 5安装GIT的基本命令的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: linux下svn常用指令(转)
- 下一篇: 连接http问题