8784: Fix test for latest firefox.
[arvados.git] / services / arv-git-httpd / usage.go
1 // arvados-git-httpd provides authenticated access to Arvados-hosted
2 // git repositories.
3 //
4 // See http://doc.arvados.org/install/install-arv-git-httpd.html.
5 package main
6
7 import (
8         "flag"
9         "fmt"
10         "os"
11
12         "github.com/ghodss/yaml"
13 )
14
15 func usage() {
16         c := defaultConfig()
17         c.Client.APIHost = "zzzzz.arvadosapi.com:443"
18         exampleConfigFile, err := yaml.Marshal(c)
19         if err != nil {
20                 panic(err)
21         }
22         fmt.Fprintf(os.Stderr, `
23
24 arvados-git-httpd provides authenticated access to Arvados-hosted git
25 repositories.
26
27 See http://doc.arvados.org/install/install-arv-git-httpd.html.
28
29 Usage: arvados-git-httpd [-config path/to/arvados/git-httpd.yml]
30
31 Options:
32 `)
33         flag.PrintDefaults()
34         fmt.Fprintf(os.Stderr, `
35 Example config file:
36
37 %s
38
39 Client.APIHost:
40
41     Address (or address:port) of the Arvados API endpoint.
42
43 Client.AuthToken:
44
45     Unused. Normally empty, or omitted entirely.
46
47 Client.Insecure:
48
49     True if your Arvados API endpoint uses an unverifiable SSL/TLS
50     certificate.
51
52 GitCommand:
53
54     Path to git or gitolite-shell executable. Each authenticated
55     request will execute this program with the single argument
56     "http-backend".
57
58 GitoliteHome:
59
60     Path to Gitolite's home directory. If a non-empty path is given,
61     the CGI environment will be set up to support the use of
62     gitolite-shell as a GitCommand: for example, if GitoliteHome is
63     "/gh", then the CGI environment will have GITOLITE_HTTP_HOME=/gh,
64     PATH=$PATH:/gh/bin, and GL_BYPASS_ACCESS_CHECKS=1.
65
66 Listen:
67
68     Local port to listen on. Can be "address:port" or ":port", where
69     "address" is a host IP address or name and "port" is a port number
70     or name.
71
72 RepoRoot:
73
74     Path to git repositories.
75
76 `, exampleConfigFile)
77 }