I had this problem, but none of the solutions above worked. I could clone and fetch but couldn't push. Eventually, I figured out the problem was in the url in my .git/config, it should be:
git@github.com:/
(not ssh://github.com//.git or https://github.com//.git).