Sourcetree push gets stuck forever, but terminal works

Lucas Mattos October 13, 2020

My Sourcetree "Push" button doesn't work anymore for one of my projects.
When I click it, it gives me the usual following log, but then the green bar just hangs forever (even if I'm just pushing 1 light tst.txt):

git -c diff.mnemonicprefix=false -c core.quotepath=false --no-optional-locks push -v --tags origin master:master
Pushing to https://github.com/MyRepoAddress

This is happening specifically to one GitHub git repository, I have tried using different credentials settings / removing and re-adding, (from basic to oauth), but it's hard think this can be the problem when other repos with the same credentials are working fine.

Weirdly, if I copy the same command to the terminal, it asks me for the credentials 3 times, and then it just works and pushes... makes me think it's really some configuration in Sourcetree's credentials that is bugged, but I can't figure what. Any ideas?

5 answers

2 votes
Marco Chiesi July 1, 2022

I had the same issue and I was able to fix it by changing the repo URL from

https://github.com/my-organization/my-project.git

to

git@github.com:my-organization/my-project.git
0 votes
kuno vaik February 5, 2024

i have same problem with git@gitlab.com:initec_ee/initec-reseller.git

0 votes
ThoMock September 22, 2023

In my case I was able to solve this by adding a parameter "pushurl" to my git config file. I had one repository where I couldn't push via Sourcetree while all other repos worked fine.

When I compared the config files (in a text editors) I noticed that the config of the problematic repository didn't have a "pushurl" parameter under [remote "origin"] (which a the same url as value as the "url" parameter.

After adding "pushurl" and restarting Sourcetree pushing was working again ...

0 votes
Sekamelica February 12, 2021

On Windows, I have the exact same problem and I haven't found a solution yet. I need LFS so I can't use your solution, and it's not caused by the URL problem that have raizen87, so I'm kinda stuck using terminal or switching for another git desktop client.
Hopefully the Sourcetree dev team will address this problem?

0 votes
raizen87 February 5, 2021

I have the same problem and don't solution. I try everything and nothing works....

Lucas Mattos February 5, 2021

Hi! It's been a while, so I don't remember exactly what solved my problem, but I think there was some activated option for LFS that shouldn't be enabled (I'm not using LFS, and for some reason it was activated) - If I'm not mistaken, I solved the problem by deactivating it.

raizen87 February 5, 2021

Hi, thanks but yor answer, but i need lfs. And this not my problem. But i resolve the problem adding user into URL settings. My URL is "https//github.com/principalUserGithub/name_project.git", but i have diferent user in github that is a team of principal user. My change is "https://my_user@github.com/principalUser/name_project.git" into settings. I don't know works but works XD. I see this configuration in my Mac, because the problem was in windows.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events