|
Re: JGit - Can't get remote's error message from failed push [message #1722386 is a reply to message #1722090] |
Thu, 04 February 2016 13:47 |
Rüdiger Herrmann Messages: 581 Registered: July 2009 |
Senior Member |
|
|
have you tried setOutputStream() to obtain the server messages?
HTH
Rüdiger
--
Rüdiger Herrmann
http://codeaffine.com
On 02.02.2016 18:29, Jesse Schulman wrote:
> I'm on the fence about filing a bug for this, can anyone shed some light
> on the situation, or would the powers that be tell me to go ahead with a
> bug?
>
> It seems that when an HTTPS remote returns a non-200 response, in my
> case 403, that we have no way to get the (very helpful) messages from
> the remote. Looks like TransportHttp will just throw a
> TransportException and we lose the remote's messages.
>
> The documentation for OperationResult suggests that the getMessages
> method could provide "informational or error messages, sent by the
> remote peer, to help the end-user correct any problems that may have
> prevented the operation from completing successfully". Unfortunately I
> never get back a PushResult(OperationResult) from the call() of the
> PushCommand because it throws the TransportException, and as noted above
> it appears those messages are never put anywhere and are lost in
> TransportHttp as it just throws the exception on 403.
>
> I'd really like to surface these messages in my application to the end
> user, as the only way I figured out their authentication issue was to
> have them run on the command line where we saw this:
>
> Username for 'https://github.com': *****
> Password for 'https://*****@github.com':
> remote: You must verify your email address.
> remote: See https://github.com/settings/emails.
> fatal: unable to access 'https://github.com/*****/test.git/': The
> requested URL returned error: 403
|
|
|
|
Powered by
FUDForum. Page generated in 0.02144 seconds