• Stars
    star
    13
  • Rank 1,512,713 (Top 30 %)
  • Language
    Go
  • Created over 8 years ago
  • Updated over 7 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

:octocat: Git HTTP backend in go

GITTP

GoDoc Go Walker Gocover Go Report Card Build Status

Host your own git server over HTTP. Effortlessly hook into pre and post receive events and write status updates back to the client.

Comes in CLI and Library flavors.

I used this doc and this handy blog post

How to CLI

Simply run gittp at your command line after installing the binary into your $PATH.

Available args:

-port: The port that gittp listens on

-path: Specify a file path where pushed repositories are stored. If this folder doesn't exist, gittp will create it for you

-masterOnly: Only permit pushing to the master branch

-autocreate: Auto create repositories if they have not been created

-debug: turns on debug logging

How to Library

Install:

go get gopkg.in/adamveld12/gittp.v1

This lib follows http.Handler conventions. I purposely do not include any authentication, since there are many http basic authentication modules out there to use.

package main

import (
  "net/http"
  "github.com/adamveld12/gittp"
)

func main() {
	config := gittp.ServerConfig{
    Path: "./repositories",
    PreCreate: gittp.UseGithubRepoNames,
    PreReceive: gittp.MasterOnly,
    PostReceive: func(h gittp.HookContext, archive io.Reader){
      h.Writef("Woohoo! Push to %s succeeded!\n", h.Branch)
    }
  }

  handle, _ := gittp.NewGitServer(config)
  log.Fatal(http.ListenAndServe(":80", handle))
}

Contributing

All contributions, critiques and questions are welcome.

License

MIT

More Repositories

1

dungeon_generator

🚧 Generates dungeons. Cures cancer.
C#
21
star
2

UnityPlanets

Some procedural planet generation in Unity 5
C#
15
star
3

arma3server

A dedicated server setup using docker
Shell
14
star
4

gamenight

🎮💻 Dedicated servers in containers for your pleasure
Shell
10
star
5

goku

A simple Docker based mini PaaS WIP
Go
5
star
6

gowatch

♻️ Watches your go code and restarts it on error/change
Go
5
star
7

svelte-go-template

Svelte, svelte-routing, tailwind, sveltestrap, svelte-awesome all embedded and served by a go backend w/ API
Svelte
5
star
8

infinecraft

🏃 A platforming block game powered by XNA Game Studio
C#
4
star
9

Xenon.Core

🎮 A core framework that helps make using XNA/Mono Game a bit easier
C#
4
star
10

dracli

Manage your Poweredge server w/ iDRAC from the command line
Go
3
star
11

powerbar

A battery status module for waybar
Go
3
star
12

ssh-server

💻 A docker image of an SSH server based on alpine linux
Shell
2
star
13

goboom

Boomerang.js beacon catcher
Go
2
star
14

gofuck

🖕 go Brainfuck Interpreter
Go
2
star
15

laughing-hipster

📂 My dot files
Shell
2
star
16

factorio

A headless Factorio docker image
1
star
17

captainhook

Run hooks with http urls
JavaScript
1
star
18

tor-docker

a tor client embedded in a docker container
Shell
1
star
19

docker-pritunl

🔐 Pritunl + Docker = ❤️
Makefile
1
star
20

CampingSimulator

Go camping and die. Fun for all ages.
C#
1
star
21

gameboxes

Steam based dedicated servers with Docker
Makefile
1
star
22

commando

💻 A simple, low friction way to build CLIs
Go
1
star
23

gojse

Go
1
star
24

XnaContentCompiler

A content compiler for XNA/Mono game projects.
C#
1
star
25

docker-steamcmd

🐳 A debian based docker image with steamcmd for dedicated servers
Shell
1
star
26

lopher

The simplest log API ever
Go
1
star
27

webpack-docker

🐳 📦 webpack, redux, and redux tools packaged inside of a docker container for easy use
JavaScript
1
star
28

jsake

🍶 [WIP] Yet another javascript build tool
JavaScript
1
star
29

tictacgo

:suspect: A multiplayer browser based tic tac toe game using websockets in go
Go
1
star