Sourcetree not remembering Stash details (extended integration)

Sourcetree will not remember my settings for Stash under Optional Extended Integration for any of my repos.  I try to create a pull request and I get a message saying I have to configure the extended integeration.  I add my stash details and the pull request will work.  A day or two will go by, I probably quit and re-open sourcetree several times, then try another pull request. I get the same message saying I don't have any extended integration configured. I keep having to re-enter the details.

6 answers

2 votes

Hi Mark, are you using SourceTree for Windows or for Mac? And which version? We do have a bug regarding the issue you described but it was fixed already, you can find it at SRCTREEWIN-6954.

If you're in the newest SourceTree version (which can be found at sourcetreeapp.com) and are still experiencing this problem, please let us know so we can look into it!

Best regards,

Ana

I am using SourceTree for Windows version 2.1.2.5.

Any update? I am still having this issue (just happend again now) using the current windows version of the app.

Mike Corsaro Atlassian Team Aug 16, 2017

Hello! This is probably a bug. Can you upload the "sourcetreeconfig" file in the ".git" directory of the repo that's causing issues? Just to confirm: you're on version 2.1.10.0?

I've checked the sourcetreeconfig file as I read that's where is stores the information. When I add the Stash credentials, it does store in that file.  But somehow Sourcetree is removing the details at some point.  Here's what the file looks like without credentials:

 

<?xml version="1.0"?>
<RepositoryCustomSettings xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<AutoRefresh>true</AutoRefresh>
<AutoRefreshRemotes>true</AutoRefreshRemotes>
<DraftCommitMsg />
<IncomingSavedCount>0</IncomingSavedCount>
<LastCheckedRemotes>2017-08-18T09:00:09.1645759-05:00</LastCheckedRemotes>
<LastUsedView>Log</LastUsedView>
<LogBranchFilterIndex>0</LogBranchFilterIndex>
<OutgoingSavedCount>0</OutgoingSavedCount>
<SidebarExpandedItems>
<string>File Status</string>
<string>Branches</string>
</SidebarExpandedItems>
<SidebarWidth>210</SidebarWidth>
<SubtreeLinks />
</RepositoryCustomSettings>

 

And after adding the Stash credentials:

 

<?xml version="1.0"?>
<RepositoryCustomSettings xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<AutoRefresh>true</AutoRefresh>
<AutoRefreshRemotes>true</AutoRefreshRemotes>
<DraftCommitMsg />
<IncomingSavedCount>0</IncomingSavedCount>
<LastCheckedRemotes>2017-08-18T09:05:10.5765759-05:00</LastCheckedRemotes>
<LastUsedView>Log</LastUsedView>
<LogBranchFilterIndex>0</LogBranchFilterIndex>
<OutgoingSavedCount>0</OutgoingSavedCount>
<RemoteProjectLinks>
<RepositoryRemoteProjectLink>
<BaseUrl>http://stash.medgate.com</BaseUrl>
<Identifier>ra/regaction</Identifier>
<RemoteName>origin</RemoteName>
<Type>Stash</Type>
<Username>mross</Username>
</RepositoryRemoteProjectLink>
</RemoteProjectLinks>
<SidebarExpandedItems>
<string>File Status</string>
<string>Branches</string>
<string>Branches/personal</string>
<string>Branches/personal/mross</string>
</SidebarExpandedItems>
<SidebarWidth>210</SidebarWidth>
<SubtreeLinks />
</RepositoryCustomSettings>

 

I am not on 2.1.10.0 as that build seems to cause lots of other issues (always tells me i have uncommited changes when I dont, slow UI, slow branch switching, etc.)

Mike Corsaro Atlassian Team Aug 18, 2017

Regarding 2.1.10 perf: can you try the following:

  • Uncheck "Refresh automatically when files change" in options, and uncheck "Refesh when application is not in focus"
  • In 2.1.2.5 run a repo benchmark: Repository->Benchmark Repo Performance and then do the same on 2.1.10.  Then upload those files
  • Try disabling Libgit2 support under the Git options

Thanks!

I unchecked the refresh settings and ran the benchmarks on both of my repos for 2.1.2.5.  The output is below.  I then upgraded to 2.1.10, unchecked the refresh settins again and tried to run the benchmark. It never completes - it has been on "Working copy file status" for several minutes now. I tried on both of my repos and it just gets stuck.  I'll try to let it run for a few more minutes, but I don't think it will complete.

I dont think there's any way to upload non-image files, so I have to copy and paste the benchmark json data:

 

{
"GetBranchesMs": 27,
"GetRemoteBranchesMs": 19,
"GetTrackingBranchesForPullMs": 22,
"GetSummaryMs": 488,
"GetTagsMs": 45,
"GetCommitLabelsMs": 120,
"GetStashesMs": 16,
"GetLogsMs": 119,
"GetCommitDetailsMs": 3,
"GetFileStatusAllMs": 434,
"GetRemoteReposMs": 2,
"TotalFiles": 24862,
"HardwareStats": [
{
"MaxClockSpeed": "3401",
"NumberOfCores": "4",
"NumberOfLogicalProcessors": "8",
"Description": "Intel64 Family 6 Model 94 Stepping 3",
"WMIObjectSearchString": "Select * from Win32_Processor"
},
{
"MemoryBytes": "8589934592",
"MemoryGb": "8",
"WMIObjectSearchString": "Select * from Win32_PhysicalMemory"
},
{
"BuildNumber": "7601",
"OSDescription": "Microsoft Windows 7 Professional ",
"WMIObjectSearchString": "Select * from Win32_OperatingSystem"
}
],
"SourceTreeVersion": "2.1.2.5",
"GitVersion": "2.14.1",
"IsSystemGit": true
}

 

{
"GetBranchesMs": 8,
"GetRemoteBranchesMs": 7,
"GetTrackingBranchesForPullMs": 15,
"GetSummaryMs": 1206,
"GetTagsMs": 26,
"GetCommitLabelsMs": 6,
"GetStashesMs": 1,
"GetLogsMs": 45,
"GetCommitDetailsMs": 1,
"GetFileStatusAllMs": 490,
"GetRemoteReposMs": 1,
"TotalFiles": 87794,
"HardwareStats": [
{
"MaxClockSpeed": "3401",
"NumberOfCores": "4",
"NumberOfLogicalProcessors": "8",
"Description": "Intel64 Family 6 Model 94 Stepping 3",
"WMIObjectSearchString": "Select * from Win32_Processor"
},
{
"MemoryBytes": "8589934592",
"MemoryGb": "8",
"WMIObjectSearchString": "Select * from Win32_PhysicalMemory"
},
{
"BuildNumber": "7601",
"OSDescription": "Microsoft Windows 7 Professional ",
"WMIObjectSearchString": "Select * from Win32_OperatingSystem"
}
],
"SourceTreeVersion": "2.1.2.5",
"GitVersion": "2.14.1",
"IsSystemGit": true
}

Mike Corsaro Atlassian Team Aug 18, 2017

Well, that's not good. Can you send me your log file (you'll have to upload it)? You can find it under:

C:\users\USERNAME\AppData\Local\Atlassian\SourceTree\sourcetree.log.

 

Additionally, can you uncheck "use libgit2" and try the benchmark again on 2.1.10? Thanks!

Here's the relevant log detail from today:

 

ERROR [2017-08-11 10:30:29,529] [1] [SourceTree.App] [.ctor] - finish EnsureSquirrelExecutionStubIsCopied
ERROR [2017-08-11 10:30:33,071] [1] [SourceTree.Utils.UpdateHelper] [GetSquirrelStagedUserId] - Couldn't read staging user ID
ERROR [2017-08-11 10:30:33,098] [1] [SourceTree.Utils.UpdateHelper] [GetSquirrelStagedUserId] - Couldn't read staging user ID
ERROR [2017-08-11 10:35:21,791] [1] [SourceTree.App] [.ctor] - finish EnsureSquirrelExecutionStubIsCopied
ERROR [2017-08-11 10:39:59,054] [1] [SourceTree.App] [.ctor] - finish EnsureSquirrelExecutionStubIsCopied
ERROR [2017-08-11 10:45:43,130] [1] [SourceTree.App] [.ctor] - finish EnsureSquirrelExecutionStubIsCopied
ERROR [2017-08-11 13:42:57,773] [1] [SourceTree.App] [.ctor] - finish EnsureSquirrelExecutionStubIsCopied
ERROR [2017-08-11 13:58:12,254] [1] [SourceTree.App] [.ctor] - finish EnsureSquirrelExecutionStubIsCopied
ERROR [2017-08-11 14:08:33,210] [1] [SourceTree.App] [.ctor] - finish EnsureSquirrelExecutionStubIsCopied
ERROR [2017-08-11 14:15:49,817] [1] [SourceTree.App] [.ctor] - finish EnsureSquirrelExecutionStubIsCopied
ERROR [2017-08-17 13:33:48,036] [1] [SourceTree.App] [.ctor] - finish EnsureSquirrelExecutionStubIsCopied
ERROR [2017-08-17 13:33:50,112] [1] [SourceTree.Utils.UpdateHelper] [GetSquirrelStagedUserId] - Couldn't read staging user ID
ERROR [2017-08-17 13:33:50,152] [1] [SourceTree.Utils.UpdateHelper] [GetSquirrelStagedUserId] - Couldn't read staging user ID
ERROR [2017-08-17 15:03:01,295] [1] [SourceTree.App] [.ctor] - finish EnsureSquirrelExecutionStubIsCopied
ERROR [2017-08-18 09:00:06,215] [1] [SourceTree.App] [.ctor] - finish EnsureSquirrelExecutionStubIsCopied
ERROR [2017-08-18 09:16:21,144] [1] [SourceTree.App] [.ctor] - finish EnsureSquirrelExecutionStubIsCopied
ERROR [2017-08-18 11:21:08,104] [1] [SourceTree.App] [.ctor] - finish EnsureSquirrelExecutionStubIsCopied
ERROR [2017-08-18 11:21:10,174] [1] [SourceTree.Utils.UpdateHelper] [GetSquirrelStagedUserId] - Couldn't read staging user ID
ERROR [2017-08-18 11:21:10,215] [1] [SourceTree.Utils.UpdateHelper] [GetSquirrelStagedUserId] - Couldn't read staging user ID

I also checked the box for "Disable LibGit2 integration" and tried to run the benchmarks again. Same issue - it hangs on "Working copy file status".

 

New entry in the log file:

 

ERROR [2017-08-18 11:47:26,091] [1] [SourceTree.App] [.ctor] - finish EnsureSquirrelExecutionStubIsCopied

Mike Corsaro Atlassian Team Aug 18, 2017

Can you do the following please:

  • Navigate to "C:\users\USERNAME\AppData\Local\Sourcetree\app-2.1.10\"
  • Open "log4net.config"
  • Change the line "<threshold value="ERROR" />" to "<threshold value="DEBUG" />"
  • Try the benchmark again on 2.1.10 and let it fail
  • Upload the log file

Well even more bizzare, when I changed the log level to DEBUG, the benchmark worked a few times. But I did get it to fail a couple times (along with a couple sucess runs) and grabbed the log files.  There are 4 log files. Hopefully you can access them here:

 

https://www.dropbox.com/sh/d6rluaxffum75lc/AADfz8dpBBD50-7MOC4evqtoa?dl=0

 

I also included the benchmarks for both versions.

Thanks, I've narrowed down the issue and created an internal ticket for the bug. A fix for it should be released in the next release. You should change that option back to "ERROR".

 

Regarding the integration issues: can you try manually adding it? Go to the repo, hit the "settings" button in the toolbar, select the remote repo path, click "edit", and fill in the extended integration options and see if the issue continues.

For the integration issue, what you stated is what I have to do. When I put in the settings manually, they will work for a couple days. Then, for some reason, they are just gone. I'll try to issue a pull request and it will prompt me to add the integration settings.  And it doesn't just happen on my computer. Two other co-workers computers  (both on Windows, version 2.1.2.5 of Sourcetree)  act the same way.

 

I'm going to try to use 2.1.10 now (as long as the performance is okay) and see if the same thing happens.

The original issue, Sourcetree forgetting my integration settings, happend again this morning using 2.1.10. I went to issue a Pull Request and got the prompt about entering integration settings.

Yesterday, using 2.1.10 as well, I was able to issue a pull request without having to put in the settings (they were already present).

Any update on this? The original issue is still happening on 2.3.1.0. Every time I quit Sourcetree, it forgets the Integration Settings.

Mike Corsaro Atlassian Team Sep 18, 2017

I'm having a hard time reproducing this issue. Does this issue happen on all repos? Additionally, is there anything that you think could be unique to this repo (is it a submodule, etc)?

 

Just to be clear, the steps to reproduce are:

  • Start Sourcetree, open repo
  • Repo settings -> Edit remote repo
  • Host type: stash, Root URL: blah, Username: blah
  • Hit OK
  • Hit OK again
  • Close Sourcetree
  • Open "{REPO-FOLDER}\.git\sourcetreeconfig"
  • Observe that "RemoteProjectLinks" entry is empty

This happens with both of the repos I use - which both have the same integration settings.  And both repos have the values removed by the issue observed.

I realize the frustration of saying this, but I also cannot actively reproduce it. I followed the steps you outlined, but the issue does NOT happen.

The only way I've seen it happen (as it did again this morning) is just by happenstance.  I'll be using Sourcetree and creating pull requests one day, and the next day the settings are gone.

I'll try to see if there's any pattern that consistently removes the settings.

Thanks

Myself and a couple of my coworkers are also having the same exact issue Mark Ross is describing here. The Stash Host URL settings disappear intermittently. When you add them back, they stay there for a few hours to a day or two, then they magically vanish. We've observed this issue in earlier versions as well as the current latest (Windows) version which we are on 2.3.1.0.

Thank you Jawad! I was starting to think it was just me.

I had the same issue happen again this morning (settings disappear) but they were present for several days last week.

I have been having this issue for a while. I have upgraded to version 2.3.1.0 but still am observing the problem. I can't find the pattern to it. The settings will 90% of the time be gone when I log in the morning.

I'm happy to help troubleshoot this as well

I have this exact same problem in Windows 7, for a while now actually. Sourcetree version 2.3.1.0

Same problem here on v2.3.1.0 and Windows 7.

Please note the settings do not disappear immediately for a given repository.

It's hard to tell what makes it go away though... Some action seems to clear the settings...

I have the exact same problem. It's driving me crazy!

I found a way to reproduce this bug - start SourceTree while the remote repo host is not available (in my case, I did not have a VPN connection to the site where the Stash repo lives). SourceTree gratuitously wipes out the RemoteProjectLink for that repo.

I too have this issue.  It may well be associated with SourceTree not being able to access the repo host.  I work remotely and it seems every time I want to create a pull request on our stash server I have to fill in the extended integration info for the repo again (roughly 2-3 times a week).  I generally only connect to the VPN when I need to push/pull and create PRs, so most of the time SourceTree does not have access to the repo host.

Same issue here. using version 2.3.5.0. Extremely annoying to have to put in the settings multiple times a week.

Same issue for me as well. I'm using 2.3.5.0. Every time I close Sourcetree, optional extended integration settings are wiped out.

We're also on 2.3.5.0 and are having the same problem.
It's also my experience that after losing connection to the repo host.

multiple colleagues are struggling with the same issue, some have given up. its really annoying to have to fill in this value at least once a week

Same thing for me. The steps to reproduce looks the same for me - sometimes SourceTree remembers the settings after exit but usually after a day or two they're gone.

 

And I'm also using VPN regularly

2 votes
Mike Corsaro Atlassian Team Jan 18, 2018

Hello everyone! This has been a tough one to debug on our end. To attempt to address the issue, we've made a change that will be rolled out in the 2.5 release. Hopefully this will solve it. 

 

Thanks!

That is awesome, looking forward to it!

Great! You have no idea how many keyboards you'll save from breaking in despair. :)

Awesome - one of the last big issues on my end since the switch to 2.x

Thanks! Waiting anxiously for it, because this bug is really annoying.

6 months later, after several software updates, the issue still persists. It is very frustrating...

Same for me. Issue is still not fixed in 2.4.7.0 :(

Happening for me and a lot of colleagues in the team.

 

I'm on Win 10 + Sourcetree 2.4.8.0.

 

I.

0 vote

I've had the same problems running on Windows 10.

After I've set "Run as Administrator" I've no longer had this problem. My idea is that we need elevation to access the stored details of the remote stash/repo stored on the local machine.

I can now create pull requests from Source Tree instead of having to log onto bitbucket.

Interesting, I'm gonna try it but for me the case was somewhere else - even after the PC restart the settings were there.

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Brian Ganninger
Published Jan 23, 2018 in Sourcetree

Tip from the team: workflow and keyboard shortcuts

Supported Platforms macOS Sourcetree has a lot to offer and, like many developer tools, finding and using it all can be a challenge, especially for a new user. Everyone might not love ...

649 views 0 4
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you