New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bitbucket - Specified argument was out of the range of valid values. #651

Closed
hbuckle opened this Issue Jun 7, 2018 · 6 comments

Comments

Projects
None yet
5 participants
@hbuckle
Copy link

hbuckle commented Jun 7, 2018

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

git.log

@mminns

This comment has been minimized.

Copy link
Collaborator

mminns commented Jun 7, 2018

Hi, just looked into this there is a bug in 1.16

here: https://github.com/Microsoft/Git-Credential-Manager-for-Windows/blob/master/Bitbucket.Authentication/Src/Authority.cs#L72

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))

@mminns

This comment has been minimized.

Copy link
Collaborator

mminns commented Jun 7, 2018

Looks like it went in here 6bbf76f#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....

@hbuckle

This comment has been minimized.

Copy link

hbuckle commented Jun 7, 2018

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.

@mminns

This comment has been minimized.

Copy link
Collaborator

mminns commented Jun 7, 2018

Yes, that was why I hadn't picked up on the same issue until today

@gistofj gistofj closed this in #652 Jun 7, 2018

@mminns mminns referenced this issue Jun 7, 2018

Merged

Issue/651 #653

gistofj added a commit to gistofj/Git-Credential-Manager-for-Windows that referenced this issue Jun 7, 2018

bitbucket: fix and test Microsoft#651
Issue-651 Basic fix and test to allow Bitbucket authentication to work again.

gistofj added a commit to gistofj/Git-Credential-Manager-for-Windows that referenced this issue Jun 7, 2018

bitbucket: fix and test Microsoft#651
Issue-651 Basic fix and test to allow Bitbucket authentication to work again.

gistofj added a commit to gistofj/Git-Credential-Manager-for-Windows that referenced this issue Jun 7, 2018

bitbucket: fix issue Microsoft#651
Added tests around InteractiveLogin to avoid additional errors.

@gistofj gistofj added this to the v1.16.2 milestone Jun 8, 2018

@gangsthub

This comment has been minimized.

Copy link

gangsthub commented Sep 22, 2018

happening again?

@mmcintyre123

This comment has been minimized.

Copy link

mmcintyre123 commented Dec 12, 2018

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment