In my case, I was using a git folder with bad rights stored on the same drive as a repo, but it could be the same with ssh even if you use an authorized login user.
Check then if you have correct rights to write on the distant repo.
Example:
Init local and distant repo
git init /tmp/src
git init --bare /tmp/dst
cd /tmp/src
Adding remote repo to origin
src > git remote add dest /tmp/dst
Simulating problem
src > chmod -R 555 /tmp/dst
Adding fake file and pushing it
src > touch a && git add a && git commit -m 'demo'
src > git push --set-upstream dest master
src > git push
Counting objects: 3, done.
Writing objects: 99% (2/3), 202 bytes | 0 bytes/s.
Git hangs
Solution
src > chmod -R 775 /tmp/dst