Skip to content

Commit

Permalink
update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
hickford committed May 4, 2024
1 parent 4c11410 commit f7a25a0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,23 +45,23 @@ To configure together with [git-credential-cache](https://git-scm.com/docs/git-c

```sh
git config --global --unset-all credential.helper
git config --global --add credential.helper "cache --timeout 7200" # two hours
git config --global --add credential.helper "cache --timeout 21600" # six hours
git config --global --add credential.helper azure
# to also use git-credential-oauth
git config --global --add credential.helper oauth
```

You may choose a different storage helper such as `osxkeychain`, `wincred` or `libsecret`, but git-credential-azure must be configured last. This ensures Git checks for *stored* credentials before generating *new* credentials.

**Windows users** must use storage helper `wincred` because [git-credential-cache isn't available on Windows](https://github.com/git-for-windows/git/issues/3892).
**Windows users** are recommended to use storage helper `wincred`.

### Manual config

Edit your [global git config](https://git-scm.com/docs/git-config#FILES) `~/.gitconfig` to include the following lines:

```ini
[credential]
helper = cache --timeout 7200 # two hours
helper = cache --timeout 21600 # six hours
helper = azure
```

Expand All @@ -71,7 +71,7 @@ On systems without a web browser, set the `-device` flag to authenticate on anot

```ini
[credential]
helper = cache --timeout 7200 # two hours
helper = cache --timeout 21600 # six hours
helper = azure -device
```

Expand Down
2 changes: 1 addition & 1 deletion git-credential-azure.1
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ A read-only Git credential helper that authenticates to Azure Repos.
Example configuration for Git:
.IP
.EX
git config --global --add credential.helper \[dq]cache --timeout 7200\[dq] # two hours
git config --global --add credential.helper \[dq]cache --timeout 21600\[dq] # six hours
git config --global --add credential.helper azure
.EE
.PP
Expand Down

0 comments on commit f7a25a0

Please sign in to comment.