if your using proxy try to go to run and enter inetcpl.cpl
then connections then Lan settings then advance
and now you see your proxy, use the http one.
then open Git Bash then enter this command
$ git config --global http.proxy
if theres no output of it then the proxy in Git Bash is not set
then set it with these command and use proxy and port shown in the 1st paragraph
Sometimes, it can be simply because your system was unable to connect to GitHub, possibly because you were not connected to the Internet (or you had a lousy connection).
(It's true - this problem can be reproduced. Just disconnect your LAN/WiFi and then do git pull, you will get the same error).
PS: This happened with me. Sometimes the problem is your internet connection rather than configs.