Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EGit / JGit » Clone Git repo produces NullPointerException(Getting NullPointerException when I try to clone a repo)
Clone Git repo produces NullPointerException [message #1814263] Sat, 07 September 2019 00:15 Go to next message
David A is currently offline David AFriend
Messages: 3
Registered: September 2019
Junior Member
I am getting an error trying to clone a GitHub repo. I generated an RSA key in Eclipse and added it to my private keys in Eclipse. I entered the public key in GitHub.

I go to my GitHub project's web page and click the clone icon and copy the URL for the SSH protocol.

Back in eclipse, I click on "Clone a Git Repository" and the URL from my clipboard is in there. I accept the defaults and click Next. After a moment, it shows the branches (development and master), so I'm assuming I have successfully connected to my GitHub and have signs of life, right?

I leave both branches checked (the default) and click Next. I choose a directory and otherwise accept the defaults, and click Finish. I immediately get a popup dialog saying 'Cloning from git@{URL}:{organization}/{project}.git' has encountered a problem. java.lang.NullPointerException.

The details only say "java.lang.NullPointerException"

Any idea how to solve this?

Further info:
-- Windows 10
-- Eclipse is eclipse-java-2019-06-R-win32-x86_64, downloaded just today.
-- We are running a GitHub enterprise server. I connected to it fine from an old laptop, but a new one is giving me fits.
-- I do not have a problem cloning with git clone at the Git Bash command line using the same SSH key.
-- When I try "Add an existing local Git repository" with the repo I cloned, I walk through the wizard and nothing happens. No errors, repo list still empty.
Re: Clone Git repo produces NullPointerException [message #1814394 is a reply to message #1814263] Tue, 10 September 2019 20:42 Go to previous messageGo to next message
Thomas Wolf is currently offline Thomas WolfFriend
Messages: 174
Registered: August 2016
Senior Member
David A wrote on Sat, 07 September 2019 00:15
After a moment, it shows the branches (development and master), so I'm assuming I have successfully connected to my GitHub and have signs of life, right?

Right.
Quote:
I immediately get a popup dialog saying 'Cloning from git@{URL}:{organization}/{project}.git' has encountered a problem. java.lang.NullPointerException.

Anything in the Eclipse log (in your workspace, under .metadata)?
Quote:
Any idea how to solve this?

Absent more information, not really. Only suggestion: install the newest EGit nightly. Maybe that might help.
Re: Clone Git repo produces NullPointerException [message #1816386 is a reply to message #1814263] Mon, 28 October 2019 21:42 Go to previous messageGo to next message
David A is currently offline David AFriend
Messages: 3
Registered: September 2019
Junior Member
Good old Windows. I tried rebooting during troubleshooting this process, but that didn't solve my problem. I had a Windows update shortly after posting this, I rebooted, and suddenly this problem went away and hasn't come back. Very strange...
Re: Clone Git repo produces NullPointerException [message #1816387 is a reply to message #1814263] Mon, 28 October 2019 21:46 Go to previous messageGo to next message
David A is currently offline David AFriend
Messages: 3
Registered: September 2019
Junior Member
After posting this, I set it aside for a few days. In the meantime, I had installed some Windows updates and rebooted. When I picked it back up, the error was no longer occurring and I haven't seen it since.
Re: Clone Git repo produces NullPointerException [message #1816677 is a reply to message #1816387] Mon, 04 November 2019 19:11 Go to previous message
Matthias Sohn is currently offline Matthias SohnFriend
Messages: 1105
Registered: July 2009
Senior Member
Check the Eclipse error log, if there was an NPE it should contain the respective stack trace pointing at the root cause
Previous Topic:JGit: HTTPS links over a proxy that requires authentication
Next Topic:Please verify my first "commit" - is it in my local repository ?
Goto Forum:
  


Current Time: Mon Dec 09 09:39:15 GMT 2019

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

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

Back to the top