Provide more helpful information on repository authentication failures.

Review Request #2019 — Created Dec. 28, 2010 and submitted — Latest diff uploaded

Information

Review Board
release-1.5.x

Reviewers

Provide more helpful information on repository authentication failures.

When failing to authenticate with a repository, we provided a very
unhelpful error talking about the username and password being wrong.
However, sometimes the username/password aren't even allowed, and the
real factor is the public key. In those cases, the user wouldn't even
know.

Now we refrain from mentioning specifics, but instead list of authentication
types we know were tried. This of course assumes the backend is using this
new error, which right now is only used for SSH errors.

When we get an authentication error that mentions that a public key is
an acceptable form of authentication, and no public key has been
generated on the server, we tell the user this and give them a link (which
opens in a new tab/window) to generate a new key.
Tested against a private GitHub account, which only allows public keys.
When I had no public key, I got the error shown in the screenshot.
When I had a public key, I got a standard auth error, listing that the
publickey was invalid (same as the first row of the error in the screenshot).

Screenshots