7
7
#+TEXINFO_DIR_CATEGORY: Emacs
8
8
#+TEXINFO_DIR_TITLE: Ghub: (ghub).
9
9
#+TEXINFO_DIR_DESC: Minuscule client library for the Github API.
10
- #+SUBTITLE: for version 2.0.0 (v2.0.0-4-g21c9e94 +1)
10
+ #+SUBTITLE: for version 2.0.0 (v2.0.0-7-g27e7b17 +1)
11
11
#+BIND: ox-texinfo+-before-export-hook ox-texinfo+-update-version-strings
12
12
13
13
#+TEXINFO_DEFFN: t
@@ -31,7 +31,7 @@ because then all packages that talk to the Github API could be
31
31
configured the same way.
32
32
33
33
#+TEXINFO: @noindent
34
- This manual is for Ghub version 2.0.0 (v2.0.0-4-g21c9e94 +1).
34
+ This manual is for Ghub version 2.0.0 (v2.0.0-7-g27e7b17 +1).
35
35
36
36
#+BEGIN_QUOTE
37
37
Copyright (C) 2017-2018 Jonas Bernoulli <
[email protected] >
@@ -99,9 +99,56 @@ to begin with.
99
99
100
100
* Getting Started
101
101
102
- If you would like to use a package that uses this library, then just
103
- do so. If the necessary information isn't available when it attempts
104
- to make a request, then you will be asked to provide it.
102
+ Each package that uses Ghub uses its own token. Despite that, changes
103
+ are good that after successfully configuring one package you can just
104
+ start using another package pretty much instantly.
105
+
106
+ If the necessary token is not available when a package makes an API
107
+ request, then a setup wizard pops up, and after answering a few
108
+ questions you are good to go. Even the request that caused the wizard
109
+ to be summoned should succeed and for most users this should be true
110
+ even when configuring the very first token.
111
+
112
+ However, in some situations some manual configuration is necessary
113
+ *before* using the wizard, or the wizard cannot be used at all:
114
+
115
+ - If you don't want to use the wizard then you don't have to and can
116
+ create tokens manually as describe in [[*Manually Creating and Storing
117
+ a Token]].
118
+
119
+ - If you want to access Gitlab.com or another Gitlab instance, then
120
+ you have to create the token manually as describe in [[*Manually
121
+ Creating and Storing a Token]].
122
+
123
+ - If you want to access a Github Enterprise instance, then you have
124
+ to tell Ghub about that before the wizard makes its appearance by
125
+ setting the Git variable ~github.host~. You also have to tell Ghub
126
+ your username for that instance using the variable ~github.HOST.user~
127
+ even if it is the same as on Github.com.
128
+
129
+ - If the variable ~github.user~ (or ~github.HOST.user~ for an Enterprise
130
+ instance) is unset when the wizard is first summoned, then you are
131
+ asked to provide your username. That value is then stored *globally*
132
+ to avoid having to ask you that question once per repository. If
133
+ you have multiple accounts on Github.com (or an Enterprise
134
+ instance), then you have to explicitly tell Ghub about that. This
135
+ can be done by setting the repository-local values of the
136
+ appropriate variable *before* the wizard is invoked.
137
+
138
+ - You might forget to do the above, which is why it is important to
139
+ carefully read the output of the wizard. If it turns out that you
140
+ forgot to set a variable, then you must abort, set the variable, and
141
+ repeat the request to trigger the wizard again.
142
+
143
+ - The setup wizard should work even if you have enabled two-factor
144
+ authentication. However it your Github Enterprise instance enforces
145
+ Single Sign-On as an additional security measure, then you are out
146
+ of luck and have to create the token manually as describe in
147
+ [[*Manually Creating and Storing a Token]].
148
+
149
+ The variables mentioned above — and others — are documented in
150
+ [[*Configuration Variables]] and the setup wizard is documented in
151
+ [[*Interactively Creating and Storing a Token]].
105
152
106
153
** Setting the Username
107
154
@@ -185,13 +232,14 @@ of the doubts that you might have:
185
232
186
233
- ~Host~ usually is "api.github.com" and that is usually what you want.
187
234
If you are trying to access a Github Enterprise instance, then it
188
- should be something else and you have to set the value manually as
189
- described in the next section.
235
+ should be something else and you have to set the value manually
236
+ before the setup wizard is summoned, as described in the parent
237
+ section.
190
238
191
239
- ~User~ should be your Github.com (or Github Enterprise instance)
192
- username. If it is something else, then you made a mistake at the
193
- first prompt or during the step described in the previous section
194
- and have to refer to that in order to fix this issue .
240
+ username. If it is something else and it doesn't look like a simple
241
+ typo, then you should read the parent section again. In either case
242
+ you have to abort .
195
243
196
244
- ~Package~ should be the name of the package you are using to access
197
245
the Github API.
0 commit comments