Authentication against bitbucket is failing with the following error
fatal: ArgumentOutOfRangeException encountered.
Specified argument was out of the range of valid values.
Parameter name: resultType
OS is Windows 10 1803. Authentication using the same credentials is working on an older machine running 1607
Hi, just looked into this there is a bug in 1.16
if (resultType != AuthenticationResultType.Failure && resultType != AuthenticationResultType.Success && resultType != AuthenticationResultType.TwoFactor)
throw new ArgumentOutOfRangeException(nameof(resultType));
it will not accept _AuthenticationResultType.None_ but it is being explicitly called with that value here: https://github.com/Microsoft/Git-Credential-Manager-for-Windows/blob/master/Bitbucket.Authentication/Src/Authentication.cs#L356
if (result = await BitbucketAuthority.AcquireToken(targetUri, credentials, AuthenticationResultType.None, TokenScope))
Looks like it went in here https://github.com/Microsoft/Git-Credential-Manager-for-Windows/commit/6bbf76f0#diff-29794b0c5f9cbdaec04a38c131925562L340
I didn't pick it up when I was doing my re-brand work as I branched before then. Unfortunately I didn't pick up on it after it was all merged as I was a bit out of the loop after that.
Working on a fix....
Great, thanks. The 1607 machine already has the credentials stored in the vault so it wouldn't hit that code whereas the 1803 is a fresh install.
Yes, that was why I hadn't picked up on the same issue until today
happening again?
happening again?
Don't forget to update your Git Credential Manager - download and run the exe, which you can find here: https://github.com/Microsoft/Git-Credential-Manager-for-Windows/releases/tag/1.18.3
Most helpful comment
happening again?