I've been using git tfs for ages and am suddenly getting the following error when trying to fetch or use rcheckin.
I'm using version 0.15.0 from Chocolatey.
I have the same repository on two different computers and have the same error on both. Running bootstrap doesn't help and even cloning again doesn't help. I can clone the repository but git tfs fetch produces the error above. If I create a new tfs-remote then I can fetch once but the second time I try to fetch throws the same exception.
git command: Starting process: git config --list
git command time: [00:00:00.0935970] config --list
Fetching from TFS remote default
git command: Starting process: git log --no-color --pretty=medium refs/remotes/tfs/default
git command time: [00:00:00.0155995] log --no-color --pretty=medium refs/remotes/tfs/default
Sep.Git.Tfs.Core.GitTfsException: Unable to locate a remote for <
http://xxx:8080/tfs/xxx>$/Url with spaces/ProjectName ---> Sep.Git.Tfs.Core.GitTfsException: Unable to locate a remote for <
http://xxx:8080/tfs/xxx>$/Url with spaces/ProjectName
at Sep.Git.Tfs.Core.GitRepository.ReadTfsRemote(String tfsUrl, String tfsRepositoryPath, Boolean includeStubRemotes) in c:\Users\matt\dev\github\git-tfs-release\GitTfs\Core\GitRepository.cs:line 78
at Sep.Git.Tfs.Core.GitRepository.TryParseChangesetInfo(String gitTfsMetaInfo, String commit, Boolean includeStubRemotes) in c:\Users\matt\dev\github\git-tfs-release\GitTfs\Core\GitRepository.cs:line 287
at Sep.Git.Tfs.Core.GitRepository.FindTfsCommits(TextReader stdout, ICollection`1 tfsCommits, Boolean includeStubRemotes) in c:\Users\matt\dev\github\git-tfs-release\GitTfs\Core\GitRepository.cs:line 271
at Sep.Git.Tfs.Core.GitRepository.<>c__DisplayClass13.<GetParentTfsCommits>b__11(TextReader stdout) in c:\Users\matt\dev\github\git-tfs-release\GitTfs\Core\GitRepository.cs:line 249
at Sep.Git.Tfs.Core.GitHelpers.<>c__DisplayClass8.<CommandOutputPipe>b__7() in c:\Users\matt\dev\github\git-tfs-release\GitTfs\Core\GitHelpers.cs:line 58
at Sep.Git.Tfs.Core.GitHelpers.Time(String[] command, Action action) in c:\Users\matt\dev\github\git-tfs-release\GitTfs\Core\GitHelpers.cs:line 182
at Sep.Git.Tfs.Core.GitHelpers.CommandOutputPipe(Action`1 handleOutput, String[] command) in c:\Users\matt\dev\github\git-tfs-release\GitTfs\Core\GitHelpers.cs:line 54
at Sep.Git.Tfs.Core.GitRepository.GetParentTfsCommits(String head, Boolean includeStubRemotes) in c:\Users\matt\dev\github\git-tfs-release\GitTfs\Core\GitRepository.cs:line 249
at Sep.Git.Tfs.Core.GitRepository.GetLastParentTfsCommits(String head, Boolean includeStubRemotes) in c:\Users\matt\dev\github\git-tfs-release\GitTfs\Core\GitRepository.cs:line 237
at Sep.Git.Tfs.Core.GitRepository.GetLastParentTfsCommits(String head) in c:\Users\matt\dev\github\git-tfs-release\GitTfs\Core\GitRepository.cs:line 232
at Sep.Git.Tfs.Core.GitTfsRemote.InitHistory() in c:\Users\matt\dev\github\git-tfs-release\GitTfs\Core\GitTfsRemote.cs:line 82
at Sep.Git.Tfs.Core.GitTfsRemote.get_MaxChangesetId() in c:\Users\matt\dev\github\git-tfs-release\GitTfs\Core\GitTfsRemote.cs:line 70
at Sep.Git.Tfs.Core.GitRepository.MoveTfsRefForwardIfNeeded(IGitTfsRemote remote) in c:\Users\matt\dev\github\git-tfs-release\GitTfs\Core\GitRepository.cs:line 109
at Sep.Git.Tfs.Commands.Fetch.DoFetch(IGitTfsRemote remote) in c:\Users\matt\dev\github\git-tfs-release\GitTfs\Commands\Fetch.cs:line 90
at Sep.Git.Tfs.Commands.Fetch.Run(String[] args) in c:\Users\matt\dev\github\git-tfs-release\GitTfs\Commands\Fetch.cs:line 78
at Sep.Git.Tfs.Commands.Fetch.Run() in c:\Users\matt\dev\github\git-tfs-release\GitTfs\Commands\Fetch.cs:line 56
--- End of inner exception stack trace ---
at Sep.Git.Tfs.Util.GitTfsCommandRunner.Run(GitTfsCommand command, IList`1 args) in c:\Users\matt\dev\github\git-tfs-release\GitTfs\Util\GitTfsCommandRunner.cs:line 32
at Sep.Git.Tfs.GitTfs.Main(GitTfsCommand command, IList`1 unparsedArgs) in c:\Users\matt\dev\github\git-tfs-release\GitTfs\GitTfs.cs:line 56
at Sep.Git.Tfs.GitTfs.Run(IList`1 args) in c:\Users\matt\dev\github\git-tfs-release\GitTfs\GitTfs.cs:line 40
at Sep.Git.Tfs.Program.Main(String[] args) in c:\Users\matt\dev\github\git-tfs-release\GitTfs\Program.cs:line 24
You may be able to resolve this problem.
- Try using `git tfs bootstrap` to auto-init TFS remotes.
- Try setting a legacy-url for an existing remote.
If no-one knows why this is happening, I'll see if I can produce a pull request for it.