Item has already been added
See original GitHub issueGetting the following error when attempting a pull or quick-export (and probably other actions, too… dunno!).
Item has already been added. Key in dictionary: ‘TMP’ Key being added: ‘tmp’
This just started happening on a system where things had been working fine previously.
Here’s the stack trace:
git command time: [00:00:00.0020002] config --list
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.ArgumentException: Item has already been added. Key in dictionary: 'TMP' Key being added: 'tmp'
at System.Collections.Hashtable.Insert(Object key, Object nvalue, Boolean add)
at System.Collections.Hashtable.Add(Object key, Object value)
at System.Collections.Specialized.StringDictionaryWithComparer.Add(String key, String value)
at System.Diagnostics.ProcessStartInfo.get_EnvironmentVariables()
at Sep.Git.Tfs.Core.GitRepository.SetUpPaths(ProcessStartInfo gitCommand) in D:\work\git-tfs\GitTfs\Core\GitRepository.cs:line 43
at Sep.Git.Tfs.Core.Ext.<>c__DisplayClass1`1.<And>b__0(T x) in D:\work\git-tfs\GitTfs\Core\Ext.cs:line 22
at Sep.Git.Tfs.Core.GitHelpers.Start(String[] command, Action`1 initialize) in D:\work\git-tfs\GitTfs\Core\GitHelpers.cs:line 223
at Sep.Git.Tfs.Core.GitRepository.Start(String[] command, Action`1 initialize) in D:\work\git-tfs\GitTfs\Core\GitRepository.cs:line 37
at Sep.Git.Tfs.Core.GitHelpers.<>c__DisplayClass8.<CommandOutputPipe>b__7() in D:\work\git-tfs\GitTfs\Core\GitHelpers.cs:line 57
at Sep.Git.Tfs.Core.GitHelpers.Time(String[] command, Action action) in D:\work\git-tfs\GitTfs\Core\GitHelpers.cs:line 183
at Sep.Git.Tfs.Core.GitHelpers.CommandOutputPipe(Action`1 handleOutput, String[] command) in D:\work\git-tfs\GitTfs\Core\GitHelpers.cs:line 54
at Sep.Git.Tfs.Core.GitRepository.ReadTfsRemotes() in D:\work\git-tfs\GitTfs\Core\GitRepository.cs:line 93
at Sep.Git.Tfs.Core.GitRepository.GetTfsRemotes() in D:\work\git-tfs\GitTfs\Core\GitRepository.cs:line 87
at Sep.Git.Tfs.Core.GitRepository.ReadTfsRemote(String remoteId) in D:\work\git-tfs\GitTfs\Core\GitRepository.cs:line 57
at Sep.Git.Tfs.Commands.Fetch.<GetRemotesToFetch>b__1(String arg) in D:\work\git-tfs\GitTfs\Commands\Fetch.cs:line 81
at System.Linq.Enumerable.WhereSelectArrayIterator`2.MoveNext()
at Sep.Git.Tfs.Commands.Fetch.Run(String[] args) in D:\work\git-tfs\GitTfs\Commands\Fetch.cs:line 54
at Sep.Git.Tfs.Commands.Pull.Run(String remoteId) in D:\work\git-tfs\GitTfs\Commands\Pull.cs:line 37
at Sep.Git.Tfs.Commands.Pull.Run() in D:\work\git-tfs\GitTfs\Commands\Pull.cs:line 32
--- End of inner exception stack trace ---
at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at Sep.Git.Tfs.Util.GitTfsCommandRunner.Run(GitTfsCommand command, IList`1 args) in D:\work\git-tfs\GitTfs\Util\GitTfsCommandRunner.cs:line 36
at Sep.Git.Tfs.GitTfs.Main(GitTfsCommand command, IList`1 unparsedArgs) in D:\work\git-tfs\GitTfs\GitTfs.cs:line 56
at Sep.Git.Tfs.GitTfs.Run(IList`1 args) in D:\work\git-tfs\GitTfs\GitTfs.cs:line 39
at Sep.Git.Tfs.Program.Main(String[] args) in D:\work\git-tfs\GitTfs\Program.cs:line 24
Issue Analytics
- State:
- Created 12 years ago
- Comments:7 (1 by maintainers)
Top Results From Across the Web
How can I resolve "Item has already been added. Key in ...
The problem is that in a sorted list each key needs to be unique. So you need to check that you aren't inserting...
Read more >An item with the same key has already been added Error
The error reads: "An item with the same key has already been added." It does not matter if I include the database name...
Read more >Error "An item with the same key has already been added"
This article helps to fix the error "An item with the same key has already been added". Applies to: Windows Server 2012 R2...
Read more >error : Item has already been added. KEy Being ...
Hello, i was trying to add a picture with name "Flow Sensor" to picturebox, and further when I tried to replace the picture...
Read more >Error: Item has already been added. Key in dictionary
This article provides brief information on the following error: Item has already been added. Key in dictionary: 'period' Key being added: ' ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
A little more info to help people out…
Cygwin is setting TEMP and TMP. Windows’ own TEMP and TMP in Cygwin are temp and tmp.
TEMP=/tmp TMP=/tmp temp=‘C:\Users\nevd\AppData\Local\Temp’ tmp=‘C:\Users\nevd\AppData\Local\Temp’
The workaround I’m using is to add these lines to my .bashrc…
unset temp unset tmp
…so that in Cygwin everything always just uses Cygwin’s own TEMP and TMP.
@git-tfs Do we have this in our troubleshooting guide?