Why are ssh and git push not working?
I used to have a similar issue back in Yosemite. Here is how I fixed it:

System Preferences -> Security or Security &amp; Privacy. -> Firewall Tab -> Click the Lock and enter your password -> Toggle Firewall on and off -> Restart your computer