git-bug_bridge_configure.md

 1## git-bug bridge configure
 2
 3Configure a new bridge.
 4
 5### Synopsis
 6
 7	Configure a new bridge by passing flags or/and using interactive terminal prompts. You can avoid all the terminal prompts by passing all the necessary flags to configure your bridge.
 8	Repository configuration can be made by passing either the --url flag or the --project and --owner flags. If the three flags are provided git-bug will use --project and --owner flags.
 9	Token configuration can be directly passed with the --token flag or in the terminal prompt. If you don't already have one you can use the interactive procedure to generate one.
10
11```
12git-bug bridge configure [flags]
13```
14
15### Examples
16
17```
18# Interactive example
19[1]: github
20[2]: launchpad-preview
21target: 1
22name [default]: default
23
24Detected projects:
25[1]: github.com/a-hilaly/git-bug
26[2]: github.com/MichaelMure/git-bug
27
28[0]: Another project
29
30Select option: 1
31
32[1]: user provided token
33[2]: interactive token creation
34Select option: 1
35
36You can generate a new token by visiting https://github.com/settings/tokens.
37Choose 'Generate new token' and set the necessary access scope for your repository.
38
39The access scope depend on the type of repository.
40Public:
41	- 'public_repo': to be able to read public repositories
42Private:
43	- 'repo'       : to be able to read private repositories
44
45Enter token: 87cf5c03b64029f18ea5f9ca5679daa08ccbd700
46Successfully configured bridge: default
47
48# For GitHub
49git bug bridge configure \
50    --name=default \
51    --target=github \
52    --owner=$(OWNER) \
53    --project=$(PROJECT) \
54    --token=$(TOKEN)
55
56# For Launchpad
57git bug bridge configure \
58    --name=default \
59    --target=launchpad-preview \
60	--url=https://bugs.launchpad.net/ubuntu/
61
62# For Gitlab
63git bug bridge configure \
64    --name=default \
65    --target=github \
66    --url=https://github.com/michaelmure/git-bug \
67    --token=$(TOKEN)
68```
69
70### Options
71
72```
73  -n, --name string         A distinctive name to identify the bridge
74  -t, --target string       The target of the bridge. Valid values are [github,gitlab,jira,launchpad-preview]
75  -u, --url string          The URL of the target repository
76  -b, --base-url string     The base URL of your issue tracker service
77  -o, --owner string        The owner of the target repository
78  -c, --credential string   The identifier or prefix of an already known credential for the API (see "git-bug bridge auth")
79      --token string        A raw authentication token for the API
80      --token-stdin         Will read the token from stdin and ignore --token
81  -p, --project string      The name of the target repository
82  -h, --help                help for configure
83```
84
85### SEE ALSO
86
87* [git-bug bridge](git-bug_bridge.md)	 - Configure and use bridges to other bug trackers.
88