Similar issue to SourceTree-requires-registration-at-launch-every-time
I have the same problem however I do not have a account.json file or the relevant settings in the user.config. described above.
I am using SourceTree 3.4.14 on Windows 11 Version 10.0.22621.
Something is going wrong with the install.
1. I run 'SourceTreeSetup-3.4.14.exe'
2. I get the registration page and I choose Bitbucket.
3. This fires off the edge browser with a blank page and a url like "localhost:34106/?code={uniquecode}&state=authenticated"
4. Don't know what to do so just close the browser and return to the install program.
5.
6.
7.
8.
9.
No
10. It then loads SourceTree
11. I click on Clone
It prompts me for my login credentials which I give.
12. The following dialogue comes up 3 times
I then try and clone and I get the following.
I get this error. The path is correct and so is my password. Whatever I try I cannot clone.
If I exit Sourcetree and then reload it I go back into the registration process.
Attached is the log file
2023-08-14T19:50:19: LogHost: Initializing to normal mode
ERROR [2023-08-14 20:07:47,416] [1] [SourceTree.Notifications.NotificationsManager] [Log] - Unable to set owner as parent is not visible or non-existent
ERROR [2023-08-14 20:12:50,051] [21] [SourceTree.Analytics.Emau.EMauSubmissionService] [Log] - Unable to generate batch, return null
System.NotSupportedException: This type of CollectionView does not support changes to its SourceCollection from a thread different from the Dispatcher thread.
at System.Windows.Data.CollectionView.OnCollectionChanged(Object sender, NotifyCollectionChangedEventArgs args)
at System.Collections.ObjectModel.ReadOnlyObservableCollection`1.OnCollectionChanged(NotifyCollectionChangedEventArgs args)
at System.Collections.ObjectModel.ObservableCollection`1.OnCollectionChanged(NotifyCollectionChangedEventArgs e)
at System.Collections.ObjectModel.ObservableCollection`1.ClearItems()
at DynamicData.ListEx.Clone[T](IList`1 source, Change`1 item, IEqualityComparer`1 equalityComparer) in d:\a\1\s\src\DynamicData\List\ListEx.cs:line 112
at DynamicData.ListEx.Clone[T](IList`1 source, IChangeSet`1 changes, IEqualityComparer`1 equalityComparer) in d:\a\1\s\src\DynamicData\List\ListEx.cs:line 76
at DynamicData.Binding.ObservableCollectionAdaptor`1.Adapt(IChangeSet`1 changes) in d:\a\1\s\src\DynamicData\Binding\ObservableCollectionAdaptor.cs:line 56
at DynamicData.ObservableListEx.<>c__DisplayClass21_0`1.<Adapt>b__1(IChangeSet`1 changes) in d:\a\1\s\src\DynamicData\List\ObservableListEx.cs:line 586
at System.Reactive.Linq.ObservableImpl.Select`2.Selector._.OnNext(TSource value) in D:\a\1\s\Rx.NET\Source\src\System.Reactive\Linq\Observable\Select.cs:line 39
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Reactive.Stubs.<>c.<.cctor>b__2_1(Exception ex) in D:\a\1\s\Rx.NET\Source\src\System.Reactive\Internal\Stubs.cs:line 16
at System.Reactive.ObserverBase`1.OnError(Exception error) in D:\a\1\s\Rx.NET\Source\src\System.Reactive\ObserverBase.cs:line 61
at System.Reactive.AutoDetachObserver`1.OnErrorCore(Exception exception) in D:\a\1\s\Rx.NET\Source\src\System.Reactive\Internal\AutoDetachObserver.cs:line 77
at System.Reactive.ObserverBase`1.OnError(Exception error) in D:\a\1\s\Rx.NET\Source\src\System.Reactive\ObserverBase.cs:line 61
at System.Reactive.Sink`1.ForwardOnError(Exception error) in D:\a\1\s\Rx.NET\Source\src\System.Reactive\Internal\Sink.cs:line 61
at System.Reactive.Linq.ObservableImpl.Select`2.Selector._.OnNext(TSource value) in D:\a\1\s\Rx.NET\Source\src\System.Reactive\Linq\Observable\Select.cs:line 41
at System.Reactive.Concurrency.Synchronize`1._.OnNext(TSource value) in D:\a\1\s\Rx.NET\Source\src\System.Reactive\Concurrency\Synchronization.Synchronize.cs:line 42
at System.Reactive.AutoDetachObserver`1.OnNextCore(T value) in D:\a\1\s\Rx.NET\Source\src\System.Reactive\Internal\AutoDetachObserver.cs:line 62
at System.Reactive.ObserverBase`1.OnNext(T value) in D:\a\1\s\Rx.NET\Source\src\System.Reactive\ObserverBase.cs:line 36
at System.Reactive.Linq.ObservableImpl.Where`1.Predicate._.OnNext(TSource value) in D:\a\1\s\Rx.NET\Source\src\System.Reactive\Linq\Observable\Where.cs:line 56
at System.Reactive.Linq.ObservableImpl.Merge`1.Observables._.InnerObserver.OnNext(TSource value) in D:\a\1\s\Rx.NET\Source\src\System.Reactive\Linq\Observable\Merge.cs:line 236
at System.Reactive.Linq.ObservableImpl.Merge`1.Observables._.InnerObserver.OnNext(TSource value) in D:\a\1\s\Rx.NET\Source\src\System.Reactive\Linq\Observable\Merge.cs:line 236
at System.Reactive.Linq.ObservableImpl.Select`2.Selector._.OnNext(TSource value) in D:\a\1\s\Rx.NET\Source\src\System.Reactive\Linq\Observable\Select.cs:line 48
at System.Reactive.Concurrency.Synchronize`1._.OnNext(TSource value) in D:\a\1\s\Rx.NET\Source\src\System.Reactive\Concurrency\Synchronization.Synchronize.cs:line 42
at System.Reactive.AutoDetachObserver`1.OnNextCore(T value) in D:\a\1\s\Rx.NET\Source\src\System.Reactive\Internal\AutoDetachObserver.cs:line 62
at System.Reactive.ObserverBase`1.OnNext(T value) in D:\a\1\s\Rx.NET\Source\src\System.Reactive\ObserverBase.cs:line 36
at System.Reactive.Subjects.Subject`1.OnNext(T value) in D:\a\1\s\Rx.NET\Source\src\System.Reactive\Subjects\Subject.cs:line 148
at DynamicData.SourceList`1.InvokeNext(IChangeSet`1 changes) in d:\a\1\s\src\DynamicData\List\SourceList.cs:line 120
at DynamicData.SourceList`1.Edit(Action`1 updateAction) in d:\a\1\s\src\DynamicData\List\SourceList.cs:line 93
at SourceTree.ViewModel.Hosted.HostedProjectsViewModel.AccountManager_OnAccountsUpdated(Object sender, EventArgs e)
at System.EventHandler.Invoke(Object sender, EventArgs e)
at SourceTree.Accounts.AccountManager.RemoveHostedAccount(IAccount account)
at SourceTree.Accounts.AccountManager.ReplaceHostedAccount(IAccount oldAccount, IAccount newAccount)
at SourceTree.Analytics.BaseAnalyticsService.get_UserId()
at SourceTree.Analytics.Emau.EMauSubmissionService.GetAasBatch()
ERROR [2023-08-14 20:13:53,864] [1] [SourceTree.ViewModel.CloneNewDialogViewModel] [Log] - Could not determine repository from: 'https://CheckpointNailbourne@bitbucket.org/nailbourne/scratch.git', output was:
ERROR [2023-08-14 20:13:53,864] [1] [SourceTree.ViewModel.CloneNewDialogViewModel] [Log] - Command: git -c diff.mnemonicprefix=false -c core.quotepath=false --no-optional-locks ls-remote https://CheckpointNailbourne@bitbucket.org/nailbourne/scratch.git
Output:
Error: remote: Invalid credentials
fatal: Authentication failed for 'https://bitbucket.org/nailbourne/scratch.git/'
ERROR [2023-08-14 20:18:07,349] [1] [SourceTree.ViewModel.CloneNewDialogViewModel] [Log] - Could not determine repository from: 'https://CheckpointNailbourne@bitbucket.org/nailbourne/scratch.git', output was:
ERROR [2023-08-14 20:18:07,349] [1] [SourceTree.ViewModel.CloneNewDialogViewModel] [Log] - Command: git -c diff.mnemonicprefix=false -c core.quotepath=false --no-optional-locks ls-remote https://CheckpointNailbourne@bitbucket.org/nailbourne/scratch.git
Output:
Error: remote: Invalid credentials
fatal: Authentication failed for 'https://bitbucket.org/nailbourne/scratch.git/'
Hi @NailBourne
I would split this into two separate problems, since the registration loop and the clone failure have different causes.
For the registration loop, I would check whether Sourcetree can actually write its account file. After you register, look in %LOCALAPPDATA%\Atlassian\SourceTree for accounts.json. If it never appears, Sourcetree is failing to persist the account, and it will show you registration again on every start.
For the clone error, that is unrelated. Bitbucket Cloud rejects your Atlassian account password over HTTPS. You need to create an app password at Bitbucket > Personal settings > App passwords with Repository read, and use your Bitbucket username, not your email, with that app password as the password. Also clear any old bitbucket.org entries in Windows Credential Manager first.
Cheers, Martin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.