You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Auto merge of #6681 - hmarr:master, r=alexcrichton
Don't retry invalid credentials from git credential helpers
If a git credential helper returns invalid credentials, we currently get stuck in an infinite retry loop by calling the credentials callback over and over, each time returning the same invalid credentials. This change means we only invoke the credential helper once.
## How to reproduce
1. Create a git credential store with some invalid credentials:
```
echo "https://example-user:[email protected]" > ~/invalid-store
```
2. Tell git to use that as your credential store by adding this to your `~/.gitconfig`:
```
[credential]
helper = store --file=/home/<user>/invalid-store
```
3. Add an invalid Git dependency to a `Cargo.toml`. For instance:
```
[dependencies.fake-repository]
git = "https://github.com/fake-user/fake-repository"
version = ">= 1.0.0"
```
4. Try to update the dependencies (e.g. with `cargo update` or `cargo build`).
Cargo hangs forever, retrying the invalid credentials.
0 commit comments