Authentication confirmed but Push/pull returns invalid username or password
Asked by mnewland:

Hi all

I can log into the webinterface and see all repositories with the same password that is authenticated in sourcetree.

When I push or Pull I get the error below. Sometimes repeated depending on the number of files.

Have tried the usual stuff. Password change, reinstall sourcetree, roll back to old version etc. same error across all repositories.

Have confirmed URL's are correct.

Sourcetree version 2.1.1.5

NB: recent update by windows.

Any help greatly appreciated.

Thanks

Mark

Error

git -c diff.mnemonicprefix=false -c core.quotepath=false -c credential.helper=manager-st push -v --tags origin master:master  
0 \[main\] us 0 init_cheap: VirtualAlloc pointer is null, Win32 error 487  
AllocationBase 0xB90000, BaseAddress 0xC10000, RegionSize 0x17D000, State 0x2000  
C:\\Users\\MNewland\\AppData\\Local\\Atlassian\\SourceTree\\git_local\\bin\\sh.exe: \*\*\* Couldn't reserve space for cygwin's heap, Win32 error 0

0 \[main\] us 0 init_cheap: VirtualAlloc pointer is null, Win32 error 487  
AllocationBase 0xB60000, BaseAddress 0xC10000, RegionSize 0x14D000, State 0x2000  
C:\\Users\\MNewland\\AppData\\Local\\Atlassian\\SourceTree\\git_local\\bin\\sh.exe: \*\*\* Couldn't reserve space for cygwin's heap, Win32 error 0

<br />

remote: Invalid username or password. If you log in via a third party service you must ensure you have an account password set in your account profile.  
fatal: Authentication failed for '<https://bitbucket.org/atcontrols_universities/usyd-xmls/>'  
Pushing to <https://bitbucket.org/atcontrols_universities/usyd-xmls>

<br />

Completed with errors, see above.


Answers:
author: Roberta Cobb
body: Ana and others: i'm getting the same error as this subject line, without the Couldn't reserve space error. I am getting just the error:

remote: Invalid username or password. If you log in via a third party service you must ensure you have an account password set in your account profile.  
fatal: Authentication failed for

I'm on Source Tree version 2.1.8.0, Windows 7.

From SourceTree\>Tools\>Options I can authenticate my username and password, but then when I fetch or pull, I get the error.

comments: author: Ana Retamal
body: Hi Roberta, there's a thread created by another member of the Community where some users share the solutions that worked for them regarding this issue. There are 3 available solutions right now, I've listed them here:

* Delete the Windows Credentials stored in Windows (that's where SourceTree stored them), delete the passwd file, then restart SourceTree. To see and remove them, do the following:
  * Open the **Control Panel** and click on **User Accounts** .
  * In the left hand list of links, click **Manage Your Credentials** . When it opens, it shows your Web Credentials.
  * Click the Windows Credentials "button". This shows your stored Windows credentials. Look for entries that start with "git:http" and include your server name and/or user name and remove them.
* Go to **Repository \> Repository Settings** , selecting my repository, and changing the username from my old Bitbucket username to my Atlassian account's email address. Then, following your original advice to remove the passwd file, I was able to successfully pull.
* Download SourceTree version 2.1.2.5 from [our website](https://www.sourcetreeapp.com/) and install it. Reject the upgrade to 2.1.10 that comes up.

I hope this helps you! If none of the above works for you, my recommendation would be to post your answer in the original thread that you can find at [Authentication issues](https://community.atlassian.com/t5/Bitbucket-questions/SourceTree-2-1-10-0-Authentication-Issues/qaq-p/623202).

Regards,

Ana


author: Roberta Cobb
body: Uninstalling and re-installing but remaining at 2.1.2.5 worked for me.

I still cannot delete the old and incorrect passwords under Tools\|Options\|Authentication. The option to delete is there, but it does nothing. And one of those is set to default = yes.

I have not tried the Windows Credentials. I will do if I encounter this again. I need to get back to work outside of fighting with this issue.

Thanks all for the help.


author: Lindsay Hall
body: I've just had this issue but the current version to download is 2.1.10. luckily I still had the old installer for 2.1.2.5 and that fixed it.


author: Ian Chan
body: I have a similar problem on Mac. Push/pull succeeds for a bit, but with the third-aprty authentication error message. However, it eventually displays an error message stating too many logins and I have to to reconnect.


author: AskAnEnemyStudios
body: I'm having the exact same issue I cannot push after the recent update


author: Ana Retamal
body: Hi Mark! This issue has been documented in our Knowledge Base [Couldn't reserve space for cygwin's heap](https://confluence.atlassian.com/sourcetreekb/exectuing-git-generates-couldn-t-reserve-space-for-cygwin-s-heap-794364929.html).

Can you try the steps in there and let us know if it worked for you?

Best regards,

Ana