GithubHelp home page GithubHelp logo

catks / gitserver-http Goto Github PK

View Code? Open in Web Editor NEW

This project forked from cirocosta/gitserver-http

0.0 1.0 1.0 210 KB

git-http-backend with repository initialization

License: MIT License

Makefile 6.33% Shell 84.32% Dockerfile 9.35%

gitserver-http's Introduction

gitserver-http CI

A http git server for testing

Usage

To run a git server without any repositories configured in advance but allowing them to be saved into ./repositories:

docker run \
  -d  \                                 # daemonize
  -v `pwd`/repositories:/var/lib/git \  # mount the volume
  -p "8080:80" \                        # expose the port
  catks/gitserver-http:0.1.0

Now, initialize a bare repository:

cd repositories
git init --bare myrepo.git

and then, just clone it somewhere else:

cd /tmp
git clone http://localhost:8080/myrepo.git
cd myrepo

Pre-Initialization

Git servers work with bare repositories. This image provides the utility of initializing some pre-configured repositories in advance. Just add them to /var/lib/initial and then run the container. For instance, having the tree:

.
└── initial
    └── repo1
        └── file.txt

and then executing

docker run \
  -d  \                                 # deamonize
  -v `pwd`/initial:/var/lib/initial \   # mount the initial volume
  -p "8080:80" \                        # expose the port
  catks/gitserver-http:0.1.0            # start git server and init repositories

will allow you to skip the git init --bare step and start with the repositories pre-"installed" there:

git clone http://localhost/repo1.git
cd repo1 && ls
# file.txt

Example

to run the example:

make example

This will create a git server http service on :80. Now you can clone the sample repository:

git clone http://localhost:8080/repo1.git

gitserver-http's People

Contributors

anyakichi avatar bunchc avatar catks avatar cirocosta avatar joergzeidler avatar

Watchers

 avatar

Forkers

listx

gitserver-http's Issues

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.