centOS下暗轉git及gitolite

來源:互聯網
上載者:User

centOS下暗轉git及gitolite 用戶端: Java代碼  $ ssh-keygen -t rsa -f ~/.ssh/admin  $ scp ~/.ssh/admin.pub server:/tmp/admin.pub    www.2cto.com  #將公開金鑰儲存到伺服器留待後用,server為伺服器的IP地址  將adminpub檔案上傳到/tmp目錄下  伺服器:  安裝git,並查看版本確定裝成功. Java代碼  $ rpm -Uhv http://apt.sw.be/redhat/el5/en/i386/rpmforge/RPMS/rpmforge-release-0.3.6-1.el5.rf.i386.rpm  $ yum -y install python-setuptools  $ yum -y install git  $ git –version    www.2cto.com  建立使用者和目錄,並設定相應許可權 Java代碼  $ mkdir -p /data/git  $ groupadd git  $ useradd -g git -d /data/git/ -s /bin/bash git  $ passwd git  $ chown -R git:git /data/git  $ chmod -R 2755 /data/git/   在剛才建立的使用者主目錄下複製gitolite(蔣鑫版) Java代碼  $ su git  $ cd $HOME  $ git clone git://github.com/ossxp-com/gitolite.git  $ exit   建立目錄,執行安裝. Java代碼  $ cd /data/git/  $ mkdir -p /usr/local/share/gitolite/conf /usr/local/share/gitolite/hooks  $ cd gitolite/src/  $ ./gl-system-install /usr/local/bin /usr/local/share/gitolite/conf /usr/local/share/gitolite/hooks   在專用帳號執行安裝指令碼. Java代碼  $ su – git  $ gl-setup /tmp/admin.pub   用戶端: Java代碼  $ git clone git@server:gitolite-admin   

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在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.