Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EGit / JGit » Git.lsRemoteRepository().call() throws NullPointerException in case of Dumb Http
Git.lsRemoteRepository().call() throws NullPointerException in case of Dumb Http [message #1697104] Mon, 01 June 2015 15:43 Go to next message
Irina Svirkina is currently offline Irina SvirkinaFriend
Messages: 1
Registered: June 2015
Junior Member
I need to validate, if repository uri is valid without clone of repository.
So I use the next command for that:
Transport transport = Transport.open("http : // server.domain.com/TestGitPluginRepo.git");
Connection connection = transport.openFetch();
connection.getRefs();


It worked ok.
But recently I found, that transport.openFetch() throws NullPointerException when git server uses Dumb HTTP (the server doesn't support Smart HTTP).
[INFO] [talledLocalContainer] java.lang.NullPointerException
[INFO] [talledLocalContainer] 	at org.eclipse.jgit.transport.WalkFetchConnection.<init>(WalkFetchConnection.java:197)
[INFO] [talledLocalContainer] 	at org.eclipse.jgit.transport.TransportHttp.newDumbConnection(TransportHttp.java:384)
[INFO] [talledLocalContainer] 	at org.eclipse.jgit.transport.TransportHttp.openFetch(TransportHttp.java:319)
[INFO] [talledLocalContainer] 	at com.mypackage.wizard.WizardConnectionValidator.isHttpAuthenticationRequired(WizardConnectionValidator.java:285)


Is there some workaround?
or
How can I validate, if repository uri is valid without clone of repository.

FYI: I'm sure, that url is correct, because I can clone the repository from console, i.e.
git clone http : // server.domain.com/TestGitPluginRepo.git
clones repository successfully.
Re: Git.lsRemoteRepository().call() throws NullPointerException in case of Dumb Http [message #1697142 is a reply to message #1697104] Mon, 01 June 2015 21:49 Go to previous message
Matthias Sohn is currently offline Matthias SohnFriend
Messages: 1268
Registered: July 2009
Senior Member
see
http://git.eclipse.org/c/jgit/jgit.git/tree/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/DumbClientDumbServerTest.java
how a dumb git http client talks to a dumb git http server
Previous Topic:Project is forgetting it's tied to a EGIT repo
Next Topic:How to import sources from local repository into GitHub ?
Goto Forum:
  


Current Time: Fri Apr 26 23:08:44 GMT 2024

Powered by FUDForum. Page generated in 0.02692 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top