summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/TransportHttp.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/TransportHttp.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/TransportHttp.java
index 5885e7b528..83ad971f78 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/TransportHttp.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/TransportHttp.java
@@ -472,13 +472,13 @@ public class TransportHttp extends HttpTransport implements WalkTransport,
throw new TransportException(uri, MessageFormat.format(
JGitText.get().authenticationNotSupported, uri));
CredentialsProvider credentialsProvider = getCredentialsProvider();
+ if (authAttempts > 1)
+ credentialsProvider.reset(uri);
if (3 < authAttempts
|| !authMethod.authorize(uri, credentialsProvider)) {
- credentialsProvider.reset(uri);
throw new TransportException(uri,
JGitText.get().notAuthorized);
}
- credentialsProvider.reset(uri);
authAttempts++;
continue;