Skip to content

Commit eda6d3a

Browse files
authored
Add FAQ entry about (un)configure commands (git-ecosystem#1366)
Add an entry in the FAQs about what the `configure` and `unconfigure` commands actually do to your Git configuration. Fixes git-ecosystem#1357
2 parents 4c3a5bc + b61a0d9 commit eda6d3a

File tree

3 files changed

+48
-0
lines changed

3 files changed

+48
-0
lines changed

docs/faq.md

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,51 @@ demonstration purposes).
230230
5. Re-authorizing the application with the new scope (GCM should automatically
231231
initiate this flow for you next time access is requested).
232232

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+
233278
[autodetect]: autodetect.md
234279
[azure-ssh]: https://docs.microsoft.com/en-us/azure/devops/repos/git/use-ssh-keys-to-authenticate?view=azure-devops
235280
[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).
251296
[gitlab-apps]: https://gitlab.com/-/profile/applications
252297
[gitlab-oauthapp-revoke]: ./img/gitlab-oauthapp-revoke.png
253298
[gitlab-oauthapp-revoked]: ./img/gitlab-oauthapp-revoked.png
299+
[helper-config-docs]: https://git-scm.com/docs/gitcredentials#Documentation/gitcredentials.txt-helper
254300
[multiple-users]: multiple-users.md
255301
[netconfig-http-proxy]: netconfig.md#http-proxy
256302
[linux-uninstall-from-src]: ./linux-fromsrc-uninstall.md

src/osx/Installer.Mac/resources/en.lproj/conclusion.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ <h2>Uninstall</h2>
3434
<h2>Resources</h3>
3535
<ul>
3636
<li><a href="https://aka.ms/gcm">Project homepage</a></li>
37+
<li><a href="https://aka.ms/gcm/faq">Frequently asked questions</a></li>
3738
<li><a href="https://aka.ms/gcm/config">Configuration options</a></li>
3839
</ul>
3940
</div>

src/osx/Installer.Mac/resources/en.lproj/welcome.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ <h2>Installation notes</h2>
2828
<h2>Learn more</h2>
2929
<ul>
3030
<li><a href="https://aka.ms/gcm">Project homepage</a></li>
31+
<li><a href="https://aka.ms/gcm/faq">Frequently asked questions</a></li>
3132
</ul>
3233
</div>
3334
</body>

0 commit comments

Comments
 (0)