Coder Social home page Coder Social logo

hagai-helman / docker-git-server Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 5 KB

A docker image of a Git HTTP server, that supports multiple Git repositories, each with different credentials.

License: MIT License

Dockerfile 47.00% Python 53.00%

docker-git-server's Introduction

helmantov/git-server is a docker image of a Git HTTP server, that supports multiple Git repositories, each with different credentials.

It's especially useful for Git repositories with hooks.

Installation

docker pull helmantov/git-server

Usage

To use the image, you need to create a folder with two sub-folders: repos and tokens:

  • repos contains your Git repositories (created using git init or git clone);
  • tokens contains a file for each repository in repos:
    • The file sets the credentials needed to access the corresponding repository.
    • The file should be named exactly like the repository folder. For example, if the folder is named my_repo.git, the filename also should be my_repo.git.
    • The file contains a token identifier and the secret token itself, separated by a colon. It's possible to have multiple entries, with each entry terminated by a single newline.

When running a container, the folder needs to be mounted to /host.

Note that the container does not support HTTPS, and is meant to be used behind a reverse proxy that does.

To connect to a repository on the server using git remote (or git clone), one should use the Git URL https://{token identifier}:{token secert}@{server base address}/repos/{repository folder name}.

Using Docker CLI

docker run \  
  -v /home/john/git-server-folder:/host \  
  -d \  
  helmantov/borg-server  

Using Docker-Compose

---  
version: "3"  
services:  
  borg-server:  
    image: helmantov/borg-server  
    volumes:  
      - /home/john/git-server-folder:/host

docker-git-server's People

Contributors

hagai-helman 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.