@@ -230,6 +230,51 @@ demonstration purposes).
230
230
5 . Re-authorizing the application with the new scope (GCM should automatically
231
231
initiate this flow for you next time access is requested).
232
232
233
+ ### Q: What do the ` configure ` and ` unconfigure ` commands do?
234
+
235
+ #### ` configure `
236
+
237
+ The ` configure ` command will set up Git to use GCM exclusively as the credential
238
+ helper. The ` configure ` command is automatically called by the installers for
239
+ Windows and macOS, but you can also run it manually.
240
+
241
+ It will also set Git to provide the full remote URL (including path) to
242
+ credential helpers for Azure Repos remotes using the ` dev.azure.com ` URL format.
243
+ This is required in order to be to able to correctly identify the correct
244
+ authority for that Azure DevOps organization.
245
+
246
+ Specifically, the ` configure ` command will modify your user Git configuration to
247
+ include the following lines:
248
+
249
+ ``` ini
250
+ [credential]
251
+ helper =
252
+ helper = <path-to-gcm>
253
+ [credential "https://dev.azure.com"]
254
+ useHttpPath = true
255
+ ```
256
+
257
+ ..where ` <path-to-gcm> ` is the absolute path to the GCM executable.
258
+
259
+ The empty ` helper = ` line makes sure that existing credential helpers that may
260
+ be set in the system Git configuration are not used. For more details see the
261
+ [ credential.helper] [ helper-config-docs ] .
262
+
263
+ If you pass the ` --system ` option, the ` configure ` command will instead modify
264
+ the system Git configuration. This is useful if you want to set up GCM for all
265
+ users on a machine.
266
+
267
+ #### ` unconfigure `
268
+
269
+ This command essentially undoes what the ` configure ` command does. It will check
270
+ your Git configuration for the lines added by the ` configure ` command and remove
271
+ them. The ` unconfigure ` command is run by the uninstaller for Windows and the
272
+ uninstall script on macOS.
273
+
274
+ On Windows, if run with the ` --system ` option, the ` unconfigure ` command will
275
+ also ensure that the ` credential.helper ` setting in the system Git configuration
276
+ is not removed and is left as ` manager ` , the default set by Git for Windows.
277
+
233
278
[ autodetect ] : autodetect.md
234
279
[ azure-ssh ] : https://docs.microsoft.com/en-us/azure/devops/repos/git/use-ssh-keys-to-authenticate?view=azure-devops
235
280
[ bitbucket-ssh ] : https://confluence.atlassian.com/bitbucket/ssh-keys-935365775.html
@@ -251,6 +296,7 @@ initiate this flow for you next time access is requested).
251
296
[ gitlab-apps ] : https://gitlab.com/-/profile/applications
252
297
[ gitlab-oauthapp-revoke ] : ./img/gitlab-oauthapp-revoke.png
253
298
[ gitlab-oauthapp-revoked ] : ./img/gitlab-oauthapp-revoked.png
299
+ [ helper-config-docs ] : https://git-scm.com/docs/gitcredentials#Documentation/gitcredentials.txt-helper
254
300
[ multiple-users ] : multiple-users.md
255
301
[ netconfig-http-proxy ] : netconfig.md#http-proxy
256
302
[ linux-uninstall-from-src ] : ./linux-fromsrc-uninstall.md
0 commit comments