gits error on push Empty reply from server

I have been trying to push new changes to my existing repo, however, I am keep getting the following error:

-MacBook-Pro:spa $ git push origin master Username for XX Password for fatal: unable to access ‘’: Empty reply from

  • Git : Self-made file has line-ending problems
  • A complete listing with rev-list
  • Unable to execute git push from Package Manager Console with GitHub for Windows installed
  • How to use environment variable for Git remote URL
  • How to use git clean remove all file list in .gitignore?
  • git submodule update --init gives error fatal: Needed a single revision Unable to find current revision in submodule path
  • I have even tried with the new repo but the result is same.

  • Git & CI: How to tag if build passes/revert commit if fails?
  • Understanding user details in git
  • How do I fetch/re-push a submodule in git?
  • Show only history of one branch in a Git log
  • Git clone with username password authentication in one go
  • Copying only files from git tag
  • 4 Solutions collect form web for “gits error on push Empty reply from server”


    The problem got fixed after restarting my Mac computer.

    Maybe mine was another problem but the same output: “Empty reply from server”.
    I resolved it by doing

    git fetch origin --prune

    After that, push was successful.

    You can restart you computer, or else restart your local server.

    I had a similar problem with Git.
    I figured it was a problem pertaining to Git Credentials managed by Windows.

    Here’s what I tried step by step

    1. Restarting my computer
    2. Restarting my network device
    3. Deleting credentials from credential manager on windows’ control panel
    4. Redefining Remote URL by using

      git remote set-url

    When I tried pushing after these steps, windows asked for new credentials. I entered my Github/whatever service’s username and password and the push was successful.

    Here’s what I think happened. When you don’t add credentials manually, Windows stores the credentials in a temporary cache when you make a repository for the first time. Unfortunately this temporary cache is lost after some time, thus the credentials for logging onto your remote Git are lost. Adding them manually once should solve the problem for good.

    Git Baby is a git and github fan, let's start git clone.