Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Sourcetree 2.6.10 ArgumentException encountered. An item with the same key has already been added

awbmansour
Contributor
October 8, 2018

Any action in source tree 2.6.10 on Windows 10 is giving me the errors listed below.

It used to work fine with Bitbucket and VSTS, but it started to give this error, and action is completed, but now it is totally unworkable:

The following output is from Sourcetree's Fetch All action

git -c diff.mnemonicprefix=false -c core.quotepath=false --no-optional-locks fetch origin


fatal: ArgumentException encountered.
   An item with the same key has already been added.

fatal: ArgumentException encountered.
   An item with the same key has already been added.

fatal: ArgumentException encountered.
   An item with the same key has already been added.

fatal: ArgumentException encountered.
   An item with the same key has already been added.


git -c diff.mnemonicprefix=false -c core.quotepath=false --no-optional-locks fetch vsts

fatal: ArgumentException encountered.
   An item with the same key has already been added.

fatal: ArgumentException encountered.
   An item with the same key has already been added.

fatal: ArgumentException encountered.
   An item with the same key has already been added.

fatal: ArgumentException encountered.
   An item with the same key has already been added.

fatal: Authentication failed for 'https://xxxxxxx.visualstudio.com/DefaultCollection/xxxxxxx/_git/yyyyyyy/'
Completed with errors, see above.

 

I have replaced the name of the project and name of repository with xxxxx and yyyyy

I have done all the known tricks such as Upgrading GIT to the latest, enabling GIT Credential Manager, use Windows 10 Credential Manager to delete the existing credentials. Uninstall Sourcetree and delete the Atlassian and Sourcetree folders … all the known tricks, still getting same errors

I have tried to use the native GIT GUI 2.19.1 and managed to FETCH, PULL and PUSH on the repositories successfully. I have tried different repositories successfully.

The issue is related to Sourcetree and not to GIT or GIT Credential manager.

 

 

17 answers

29 votes
Deleted user October 23, 2018

This issue is not related to the git version but only to the version of Git Credential Manager. I installed git 2.19.1 which includes GCM 1.18.0 and throws the mentioned errors. After downgrading GCM to 1.17.2 everything is working fine. So something has been done in GCM release 1.18.0 that is not compatible to sourcetree 2.6.10.

Richard S Wheatley
Contributor
October 23, 2018
Like # people like this
Rolf B
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
October 25, 2018

THANKS! Although the link from Richard seems to be broken, simply downloading and installing GCM 1.17.2 fixed it for me!

https://github.com/Microsoft/Git-Credential-Manager-for-Windows/releases/tag/v1.17.2

Like # people like this
Ronak Panchal
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
October 29, 2018

Thanks @Rolf B. Your tip worked for me too.

Jackie - Tu Nguyen
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
October 30, 2018

Thanks @[deleted] and Rolf B, it worked for me!

SaranVemu
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
November 1, 2018

Thank you @[deleted] @Rolf B!!!!!

amv November 2, 2018

Thanks @Rolf B, you're fix worked for me too.

Abinash
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
November 7, 2018

Thanks, this worked for me.

Like # people like this
orbtech
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
November 12, 2018

cheers, did it for me.

Like # people like this
megabrian December 3, 2018

Was juggling 8 atlassian instruction pages most the day yesterday and this was the final thing to get it working with the new App password system for me.  Just installing GCM 1.17.2 exe file and then running sourcetree again got everything back to normal.  

I'd been getting endless pop-ups to log into my bitbucket account, but I think that was related to the updates from bitbucket.   Eventually got this working after also following some SSH key generation and installation instructions    

Don't save the key in a folder that has spaces in its name!

Nikhil Dwivedi
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
December 5, 2018

thanks

eddysarita
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
December 5, 2018

Ran into this issue today.

Updating to Git 2.19.2 instead of downgrading fixed it for me.

Deleted user December 11, 2018

Thanks @Rolf B, you're fix worked for me too. 

berenkusmenoglu
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
December 20, 2018

Thanks!

Venkata Naga Sasi Kiran Prakhya
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
January 3, 2019

Downloading and installing GCM from the above link worked for me.

Jordan January 4, 2019

New version of Git for Windows is available: 2.20.1. Install it and be happy (it fixes the problem)!

hemin_patel
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
January 8, 2019

Ohh Thanks...! Mr. Richard and Mr. Rolf

It is easy way for fix my problems.

 

Follow below steps :

1) Go to the https://github.com/Microsoft/Git-Credential-Manager-for-Windows/releases/tag/v1.17.2

2) Download the ''GCMW-1.17.2.exe'' file and install it your window machine.

3) Take pull/push 

4) Pop up the authentication dialog.

5) Enter your git credentials.

6) Then it will be working well.

Jacek Szybisz
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
January 11, 2019

Thanks. That worked for me

Hicham Chafik
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
January 6, 2020

Thanks, this worked for me.

Kevin Aung
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
March 12, 2020

This worked for me too with SourceTree v3.3.8.  Thanks!

5 votes
Philip Ross
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
October 8, 2018

I encountered the same errors with a GitHub repository after upgrading to Git 2.19.1 (I'm using the System Git in SourceTree).

I've now downgraded to Git 2.19.0, which seems to have resolved the issue.

awbmansour
Contributor
October 10, 2018

Many Thanks for your reply.

I tried to switch to the Embedded version and it addressed a big part of the problem.

  • At least I am able now to interact with the Bitbucket Repository, though I am still getting the same annoying message but only 1 occurrence, instead of 4.
  • Your solution addressed the issue completely with VSTS. It is working with no errors.

So, apparently GIT 2.19.1 is not supported with Sourcetree.

If only we can know this before hand, we could have saved about 6 hours of trial and errors.

gobater
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
November 29, 2018

The issue seems to be solved with Git 2.19.2

4 votes
griiettner
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
October 17, 2018

I started to have this issue, when I upgraded my git 2.19.1. So I reverted it back to 2.19.0 and the issue went away.

I don't why, but Source Tree have some kind of incompatibility with newer git version

Richard S Wheatley
Contributor
October 23, 2018

It is the updated Git Credential Manager that it has a conflict with.

2 votes
minnsey
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
November 7, 2018

GCM 1.18.3 has been released with a fix for this issue https://github.com/Microsoft/Git-Credential-Manager-for-Windows/releases/tag/1.18.3

It will take a few days for it to work through to a Git for Windows release.

Koos van der Kolk November 8, 2018

This worked for me, thanks!

Like Spike McLarty likes this
geometrikal November 19, 2018

Worked for me too

MARC BERTRAND
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
November 20, 2018

Worked for me too

Janice Vann December 2, 2018

This version (1.18.3) worked for me too.

1 vote
minnsey
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
October 8, 2018

Hi 

I know you say its not a Git or GCM issue, but that error is being thrown by the GCM.

If you are still getting the error can you open the Terminal from Sourcetree in this repo and try running the same command.

git -c diff.mnemonicprefix=false -c core.quotepath=false --no-optional-locks fetch origin

If you get the same error can you then run

git credential-manager version

Can you let me know the results?

awbmansour
Contributor
October 10, 2018

Many Thanks for taking care of my issue. Greatly appreciated.

Here are the results:

xxx@yyyyy MINGW32 ~/Documents/Visual Studio 2017/Projects/zzzzz (E060Prep)
$ git -c diff.mnemonicprefix=false -c core.quotepath=false --no-optional-locks fetch origin
fatal: HttpRequestException encountered.
   An error occurred while sending the request.
fatal: HttpRequestException encountered.
   An error occurred while sending the request.

 

It then prompts me to enter (OpenSSH) password for bitbucket account, though I am not using OpenSSH at all.

 

$ git credential-manager version
Git Credential Manager for Windows version 1.16.1

 By the way, I managed to get around (partially) the complete failure of reaching my repositories, by using the trick of switching to the Embedded version of GIT. So, it looks that GIT 2.19.1 is having problems with Sourcetree 2.6.10

I even tried to upgrade to Sourcetree 3.0.3 and the situation got more complicated, as it started to give me one more error on AskPass missing, which I opened a different ticket for it, and they confirmed that they have a release problem that they will fix for AskPass.

So, my workaround situation now that I have returned back to 2.6.10 with the Embedded GIT, and if I do a Fetch action on any repository, I get now one Annoying message, but it actually completes the action.

Please note that now with the Embedded version of GIT, the command syntax has an additional option to invoke the GIT Credential Manager which was not the case before with GIT 2.19.1, so it looks you are right, the issue is in-between the integration of Sourcetree and GIT.

Please note that with VSTS the Embedded version is working flawlessly.

 

git -c diff.mnemonicprefix=false -c core.quotepath=false --no-optional-locks -c credential.helper= -c credential.helper="C:/Users/admin/AppData/Local/ATLASS~1/SOURCE~1/GIT_EX~1/GIT-CR~1.EXE" fetch origin


fatal: HttpRequestException encountered.
   An error occurred while sending the request.


git -c diff.mnemonicprefix=false -c core.quotepath=false --no-optional-locks -c credential.helper= -c credential.helper="C:/Users/admin/AppData/Local/ATLASS~1/SOURCE~1/GIT_EX~1/GIT-CR~1.EXE" fetch vsts


Completed successfully.
 

So, with the Embedded version, all Actions are completing with one time error with Bitbucket that does NOT stop the actual action from completing

fatal: HttpRequestException encountered.
   An error occurred while sending the request.

And with Visual Studio Team Services, it is working flawlessly.

minnsey
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
October 22, 2018

The Askpass error will be fixed in upcoming v3.0.8

awbmansour
Contributor
October 26, 2018

I have opened a ticket with GIT folks  Here ..

0 votes
eyob sisay
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
October 31, 2019

pusherror.PNGi got this problem when i push

0 votes
Stewart Martin
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
May 22, 2019

I was able to resolve this by upgrading git for windows from 2.18 to 2.21
Sourcetree is set to use system git instead of embedded.

0 votes
bariserkus
Contributor
January 15, 2019

Anybody tried GCMW v 1.18.x recently? Have the issues been fixed?

I am still using v 1.17.2 as I used to have issues with v1.18.x when cloning from a private GitHub repository.

0 votes
awbmansour
Contributor
October 30, 2018

GIT Credential Manager folks are releasing a Fix for this problem. It is committed to master branch already, so I guess it will soon be released.

Look at here for more details

0 votes
amv October 25, 2018

Same problem on source tree 3.0.8 using system git 1.19.1

0 votes
Thomas Scheelhardt October 24, 2018

@minnsey As Rajesh pointed out there is currently no working solution.

With Git 2.19.1 we can't push. When downgrading we keep getting spammed with login prompts, despite the fact that stored credentials are correct.

You seriously need to sort this out, as your product is completely useless in its current form.

Richard S Wheatley
Contributor
October 24, 2018

Did you try downgrading to GCM version 1.17.2? That is what worked for me.

After downgrading, sign out of any web-based git managers. Sign back in.

 

https://github.com/Microsoft/Git-Credential-Manager-for-Windows/releases/tag/v1.17.2

Thomas Scheelhardt October 24, 2018

I downgraded to 2.19, which means GCM 1.17.1. I haven't tried installing 1.17.2 however.

But we have been riddled with this bug for ages, and have yet to receive an answer from Atlassian on how to fix it.

Richard S Wheatley
Contributor
October 24, 2018

Did you report it in the Sourcetree Bug Reports?
This is the Questions area.

 

Atlassian monitors this area but will definitely respond quick if you report a bug.

0 votes
James Gould October 22, 2018

Can confirm that downgrading worked perfectly, went from 2.19.1 to 2.19.0 and its fine now. Thanks for looking into it @minnsey

0 votes
minnsey
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
October 22, 2018

Hi 

It looks like there is a bug relating to Bitbucket in the GCM v1.18.x bundled with Git 2.19.1

We will see what we can do.

0 votes
Guanbo Wang
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
October 21, 2018

Same problem here and same workaround as above: reverting system Git back to v2.19.0.

Updating Sourcetree/embedded Git didn't work for me. Hope there will be a solution to this soon!

0 votes
gavreh
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
October 21, 2018

I am having the same problems here. What's going on? Embedded git makes it happen to (v2.17.1)

0 votes
Deleted user October 18, 2018

Hi everyone,

 

Just wanted to add..

I had the same issue, sourcetree 2.6.10 with git 2.19.1 not working, as soon as i revert to 2.19.0 everything started to work again.

 

HOWEVER! I have a friend with 2.6.10 and 2.19.1 and it works for him, he was on 2.19.0 and upgraded and he is also working with the system version and not embedded.

 

FYI

0 votes
v s rajesh uppalapati
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
October 18, 2018

while using git 2.19.0 version with source tree 2.6.10, source tree continuously asking for atlassian username and password and authentication keeps failing. when i try to upgrade my git version to 2.19.1 im facing  'An item with the same key has already been added.' error.

could you please let us know the appropriate compatible versions. 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events