• Stars
    star
    13
  • Rank 1,462,374 (Top 30 %)
  • Language
    Go
  • Created almost 8 years ago
  • Updated about 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
9
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

infinecraft

๐Ÿƒ A platforming block game powered by XNA Game Studio
C#
4
star
8

Xenon.Core

๐ŸŽฎ A core framework that helps make using XNA/Mono Game a bit easier
C#
4
star
9

svelte-go-template

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

dracli

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

ssh-server

๐Ÿ’ป A docker image of an SSH server based on alpine linux
Shell
2
star
12

goboom

Boomerang.js beacon catcher
Go
2
star
13

gofuck

๐Ÿ–• go Brainfuck Interpreter
Go
2
star
14

laughing-hipster

๐Ÿ“‚ My dot files
Shell
2
star
15

powerbar

A battery status module for waybar
Go
2
star
16

captainhook

Run hooks with http urls
JavaScript
1
star
17

tor-docker

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

docker-steamcmd

๐Ÿณ A debian based docker image with steamcmd for dedicated servers
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

lopher

The simplest log API ever
Go
1
star
26

factorio

A headless Factorio docker image
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