Merge branch '10129-cwl-remove-listing' closes #10129
[arvados.git] / services / arv-git-httpd / usage.go
1 package main
2
3 import (
4         "encoding/json"
5         "flag"
6         "fmt"
7         "os"
8 )
9
10 func usage() {
11         c := defaultConfig()
12         c.Client.APIHost = "zzzzz.arvadosapi.com:443"
13         exampleConfigFile, err := json.MarshalIndent(c, "    ", "  ")
14         if err != nil {
15                 panic(err)
16         }
17         fmt.Fprintf(os.Stderr, `
18
19 arv-git-httpd provides authenticated access to Arvados-hosted git repositories.
20
21 See http://doc.arvados.org/install/install-arv-git-httpd.html.
22
23 Usage: arv-git-httpd [-config path/to/arv-git-httpd.yml]
24
25 Options:
26 `)
27         flag.PrintDefaults()
28         fmt.Fprintf(os.Stderr, `
29 Example config file:
30     %s
31
32 Client.APIHost:
33
34     Address (or address:port) of the Arvados API endpoint.
35
36 Client.AuthToken:
37
38     Unused. Normally empty, or omitted entirely.
39
40 Client.Insecure:
41
42     True if your Arvados API endpoint uses an unverifiable SSL/TLS
43     certificate.
44
45 Listen:
46
47     Local port to listen on. Can be "address:port" or ":port", where
48     "address" is a host IP address or name and "port" is a port number
49     or name.
50
51 GitCommand:
52
53     Path to git or gitolite-shell executable. Each authenticated
54     request will execute this program with the single argument
55     "http-backend".
56
57 RepoRoot:
58
59     Path to git repositories. Defaults to current working directory.
60
61 `, exampleConfigFile)
62 }