Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jgit-dev] JGit Error - Cannot open git-upload-pack

Hi Thomas,

Thanks for the reply. To answer your question we are using 4.1.0.201509280440-r and yeah, we have put the debug point in TransportHttp.connect() method and noticed IOException is getting thrown but without any message( ioException.getMessage() is returning null). 

We will try updating the JGit library in your product but, before that we would like to try increasing the connection timeout. How do we increase the timeout in JGit library? 

Thanks,
Malli

On Thu, Jul 16, 2020 at 2:20 AM Thomas Wolf <thomas.wolf@xxxxxxxxxx> wrote:

> On 15 Jul 2020, at 19:21 , MalliKarjuna Reddy <tomallikarjunareddy@xxxxxxxxx> wrote:
>
> Error: org.eclipse.jgit.api.errors.TransportException: https://<host>/DefaultCollection/_git/<repo>: cannot open git-upload-pack.
>
> Short search on stackoverflow seems to sslsetting to the git server and a lot of answers have mentioned to disable the ssl verification.
>
> Following the stackoverflow suggestions we have set http.sslverify to false on git bash globally and added the server certs to the truststore.
>
> But, even after performing the above settings the error didn't go away. We tried all the options but of no use and we don't see this error earlier in our product and this is the first time.

With that little information it's hard to guess what might be the cause.

Which JGit version are you using? Try updating to JGit 5.8.0 or 5.8.1 if
you're using an older version. Older versions may mistakenly report this
error when connection timeouts occur; 5.8.0 will report an expired timeout.
If that's the cause, increase the connection timeout. Older versions also
had a problem with relative redirects.

Otherwise: the TransportException thrown should have the original IOException
as cause; that might give additional hints.

If this occurs only with some hosts: what git server are these using? Might
it be a bug in that git server?

Finally, since it's your own product, you should be able to debug it. If you
can trigger the problem reliably, a breakpoint in TransportHttp.connect()
and then stepping through might show where the problem occurs.

Cheers,

  Thomas



_______________________________________________
jgit-dev mailing list
jgit-dev@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/jgit-dev

Back to the top