flag.StringVar(&theConfig.Addr, "address", "0.0.0.0:80",
"Address to listen on, \"host:port\".")
flag.StringVar(&theConfig.GitCommand, "git-command", "/usr/bin/git",
- "Path to git executable. Each authenticated request will execute this program with a single argument, \"http-backend\".")
+ "Path to git or gitolite-shell executable. Each authenticated request will execute this program with a single argument, \"http-backend\".")
cwd, err := os.Getwd()
if err != nil {
log.Fatalln("Getwd():", err)
Env: []string{
"GIT_PROJECT_ROOT=" + theConfig.Root,
"GIT_HTTP_EXPORT_ALL=",
+ "SERVER_ADDR=" + theConfig.Addr,
+ },
+ InheritEnv: []string{
+ "PATH",
+ // Needed if GitCommand is gitolite-shell:
+ "GITOLITE_HTTP_HOME",
+ "GL_BYPASS_ACCESS_CHECKS",
},
- InheritEnv: []string{"PATH"},
Args: []string{"http-backend"},
}
mux := http.NewServeMux()