Search code examples
gitfatal-errorgit-pullgit-fetch

How can I resolve "Recv failure: Connection reset by peer" error


I'm trying $ git pull or $ git fetch command on myRepo gives me error but myTestRepo works fine.

Commands give me that error.

Fetching origin
fatal: unable to access 'http://mysite/myPath/myRepo.git/': Recv failure: Connection reset by peer
error: Could not fetch origin

I tried git $ git fetch -p and $ git fetch -p --all -f command, they worked one or two times after that that commands give the same error.


Solution

  • I was using http connection, I changed my connection to ssh instead of http and the problem was solved