Git Product home page Git Product logo

giterman's Introduction

安装

PHP扩展库

  • mcrypt
  • ssh2

=====

克隆代码

git clone https://github.com/yanpeipan/giter.git
cd giter
git submodule init
git submodule update
curl -sS https://getcomposer.org/installer | php -- --filename=composer --install-dir=/usr/bin
composer update

创建keygen

ssh-keygen -t rsa -C "[email protected]"
openssl rsa -in ~/.ssh/id_rsa -outform pem > protected/config/.ssh/id_rsa.pem

git仓库server搭建

环境介绍

  • 系统环境:Ubuntu 10.10
  • 软件环境:git version 1.7.1 ; Apache/2.2.16
  • 说明:Git访问方式:基于http的基本验证(非SSL)

安装步骤

  1. 安装软件

    apt-get install -y git-core git apache2

  2. 仓库目录设置

    mkdir -p /scm/git/{repository,auth} && chown -R www-data. /scm/

  3. Apache配置

     Alias /git "/scm/git/repository"
     <Directory "/scm/git/repository/">
     	Dav On
     	Options +Indexes +FollowSymLinks
     	Deny from all
     	Order Allow,Deny
     	AuthType Basic
     	AuthName "Git"
     	AuthUserFile "/scm/git/auth/git.user"
     	AuthGroupFile "/scm/git/auth/git.group"
     </Directory>
    
     <Directory "/scm/git/repository/test.git/">
     	Allow from all
     	Order Allow,Deny
     	<Limit GET>
     		Require group hgz-read
     	</Limit>
     	<Limit GET PUT POST DELETE PROPPATCH MKCOL COPY MOVE LOCK UNLOCK>
     		Require group hgz-write
     	</Limit>
     </Directory>
    

测试服务器是否可用

  1. 创建测试项目

    cd /scm/git/repository && git init --bare test.git && cd test.git && git update-server-info && cp ./hooks/post-update.sample ./hooks/post-update && chown -R www-data. ../test.git

  2. 在其他机器上git clone

    git clone http://gitserver/git/test.git

giterman's People

Contributors

hgz6536 avatar yanpeipan avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.