Popularity
1.6
Declining
Activity
0.0
Stable
13
2
5

Description

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.

Programming language: Go
Latest version: v1.0

gittp alternatives and similar packages

Based on the "Version Control" category.
Alternatively, view gittp alternatives based on common mentions on social networks and blogs.

Do you think we are missing an alternative of gittp or a related project?

Add another 'Version Control' Package

README

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


*Note that all licence references and agreements mentioned in the gittp README section above are relevant to that project's source code only.