Better error message when pushing to protected branch over HTTP
If I try to push to a protected branch I get the following error message:
$ git push origin master
Username for 'http://jacob.gitlap.com': jacob
Password for 'http://jacob@jacob.gitlap.com':
Counting objects: 15, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (3/3), done.
Writing objects: 100% (9/9), 840 bytes | 0 bytes/s, done.
Total 9 (delta 0), reused 0 (delta 0)
error: RPC failed; result=22, HTTP code = 401
fatal: The remote end hung up unexpectedly
fatal: The remote end hung up unexpectedly
Everything up-to-date
It would maybe be nice if we could give an error saying why the push failed.

We’re accepting merge requests for this.