[PATCH] Abort git authentication attempt

Dirk Hohndel dirk at hohndel.org
Mon Apr 25 09:07:10 PDT 2016


On Sat, Apr 23, 2016 at 06:53:15PM +0300, Miika Turkia wrote:
> If we have incorrect cloud credentials, we need to return an error on
> git authentication call back in order to avoid endless authentication
> loop. This might well happen e.g. when changing the password on desktop
> and then on laptop Subsurface still thinks the credentials are validated
> and ends up in the authentication loop.
> 
> The authentication call back on libgit is intended to be used to ask for
> user credentials, and as we handle credentials elsewhere, we just need
> to fail the authentication attempts. (The threshold for bail out could
> have been 1 attempt...)

Would it make more sense to use report_error (instead of fprintf(stderr,...)
so that the message eventually makes it to the user, even if this wasn't
started from the command line?

/D


More information about the subsurface mailing list