zoukankan      html  css  js  c++  java
  • 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 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,就可以解决问题~~~
    
    
  • 相关阅读:
    iOS-国家代码选择功能github开源分享
    Nehe OpenGL lesson 8
    POJ 3083:Children of the Candy Corn(DFS+BFS)
    LeetCode 14
    一起talk C栗子吧(第二十二回:C语言实例--队列一)
    高仿手机QQ音乐之——Android带进度条的开关
    11.1 半联结
    oracle调优 浅析有效的游标管理
    经典算法——Jump Game(II)
    从Vue文件到Html文件
  • 原文地址:https://www.cnblogs.com/ZHF/p/CentOS.html
Copyright © 2011-2022 走看看