Error when pushing in Github Desktop

Hi all, I’ve been using Github + Github Desktop at a super basic level for the past few months — basically only creating repos, committing to main, and pushing updates. That’s been sufficient for my purposes, but over a week ago, after “Committing to main” I tried to “Push origin” on a repo, and instead received an error message, saying:


(Note: Every so often, the number that appears after “ERROR: Couldn’t connect to 127.0.01:” changes.)

Since then, I turned off my firewall and flailed down various online rabbit holes, but to no avail. I made a new repo just to test things out and I can’t “publish branch” either because I get the same error message when I try. I hadn’t done anything different from usual leading up to that push that brought up the first fateful error message. I have no idea what most of this error message even means; I’m at a total loss as to what went wrong here. Does anyone have any idea what could be going on?

@iriseel
I might be wrong with this but I never faced the same issue while using github desktop.
The last line of the error mesage is
fatal: coult not read Username for 'https://github.com': terminal prompts disabled

the line terminal prompts disabled is the main issue.
Tried searching for the issue on googlle and this is what I found

1.

2.

I think the 2nd solution is more eazy.
Hope it Helps :rescue_worker_helmet:

1 Like

@bhawesh2002 Thanks for your reply! I took a look at what you found and tried the second option of adding the following code to terminal:

git config --global --add url."git@github.com:".insteadOf "https://github.com/"

I also created an SSH key as per the instructions here and linked it to my github account. However, I hadn’t yet tested my connection as instructed here. So what I got when I tried to push in Github Desktop was the more usual Authentication error message, “Authentication failed. Some common reasons include …” instead of the original one. Afterwards, I doubled back and tested my SSH connection, after which the push on Github Desktop went through!!! I could also “publish branch” the new repo I made. Hurray!

My only nagging worry now is that I still have no idea why I ran into the original error in the first place. Unlike what the author of the second troubleshooting option you suggested wrote, I didn’t have 2FA enabled. And unlike the op of the first Stackoverflow option, I wasn’t doing anything in Terminal before this problem — I had only been pushing and pulling in Github Desktop.

1 Like

@iriseel
Happy that your error is solved.

And I also don’t have any idea on why you encountered the original error.
I think it is one of those random errors that we get when everything goes fine. :wink:

1 Like