git 使用過程中問題記錄

一. 系統使用過程中問題記錄

    1.  git checkout tfs 代碼出現問題 ,


      git_tfs1.png


       # 查詢後爲 git 版本過低造成,升級新版軟件(系統爲: CentOS release 6.5 (Final))

  # git --version
     git version 1.7.1
     
   # 卸載舊版本 git
   # yum remove git
   
   # 安裝一些依賴軟件
   # yum install curl-devel expat-devel gettext-devel openssl-devel zlib-devel asciidoc  
   # yum install  gcc perl-ExtUtils-MakeMaker 
     
   # 安裝新版 git
   
   # 安裝libiconv  
   # cd /tmp
   # wget http://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.14.tar.gz
   # tar -zxvf libiconv-1.14.tar.gz4、# cd libiconv-1.14
   # ./configure --prefix=/usr/local/libiconv  &&  make  && make install
   
   # 添加 軟連接 
   # ln -s /usr/local/lib/libiconv.so /usr/lib
   # ln -s /usr/local/lib/libiconv.so.2 /usr/lib
   
   # wget https://www.kernel.org/pub/software/scm/git/git-2.15.1.tar.xz
   # cd /usr/local/scr/git-2.15.1
   # make configure
   # ./configure --prefix=/usr/local/git --with-iconv=/usr/local/libiconv  && make && make install
   
   # 添加軟連接
   # ln -s /usr/local/git/bin/git /usr/bin/git
   
   # git --version
    git version 2.15.1


   

    2.  jenkins 執行 shell sudo  命令出現問題

        sudo 問題:sorry, you must have a tty to run sudo

  # cat /etc/sudoers (或 visudo 直接編輯)
   # 註釋掉 Default requiretty 一行
   # Default  requiretty

     3. 保存 yum 下載的rpm 包

      # 編輯 /etc/yum.conf 文件, 將 keepcache=0 修改爲 keepcache=1,

      
    # vim/etc/yum.conf
    [main]
    cachedir=/var/yum     # 保存的目錄
    keepcache=1




發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章