Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » Can't git(can't connect to git via https or ssh)
Can't git [message #1793674] Mon, 13 August 2018 21:33 Go to next message
Steve Jensen is currently offline Steve JensenFriend
Messages: 2
Registered: August 2018
Junior Member
Dragging myself into the 21st century and moving away from "console and text editor is all I need". Guess I'm getting lazy in my old age ... or wanting to be a better developer :) Figure may as well learn how to use Eclipse (I do Java and PHP back end/middleware stuff) and while I am at it git too.

Unfortunately, when I pick "file -> import -> git" I cannot browse GitHub due to SSL errors.

Error searching repositories: java.lang.RuntimeException: Unexpected error: the trustAnchors

If I select "Clone URI" and put in the https url of a public project on GitHub I get a similar error, with a popup suggesting I have the DNS name wrong, there is no internet connection, or that I just just disable SSL certificate validation. Checking the log file reveals a similar trustAnchors error.

OK... so I installed git on one of my servers, got a LetsEncrypt SSL cert for it, etc. installed gitlab ce and all that stuff. Set up a user on it, started a project via web interface, and I have the same issues as with GitHub.

So I instead try to use SSH. Upload my public key to my server, tell Eclipse to connect via SSH instead, and while I can manually connect from command line as the git user I can't connect via git in Eclipse. Checking my firewall and auth.log on the server, I can see that git/eclipse is trying to connect to port 22 instead of the port I specified (I run ssh on a non-standard port). Yes, I entered the correct non-standard port in the Eclipse interface with the other connection details.

So... whats a guy gotta do to get some git going gang?

Do I need to set up my .gitconfig in a specific way to handle non-default SSH ports? What do I need to fix the SSL error(s) ? I believe they are the same error, if not they are closely related.

Other possibly relevant stuff -

OS - Mint 19. Yes, I installed Eclipse from (downloaded tarball and extracted it)
Oracle Java 8 set as default JRE, have 10 available if needed. Have been working fine with 8 for school work and experimentation

My various cacerts files since what I've found online references those.
No idea on how to validate content of the cacerts files though....

sj@darkstar:~$ ls -l $(locate /cacerts)
-rw------- 1 root root    384 Apr  8 07:19 /etc/default/cacerts
-rw-r--r-- 1 root root 170884 Jun 26 12:13 /etc/ssl/certs/java/cacerts
-rw-r--r-- 1 root root  95881 Jun  5  2017 /opt/android-studio-2.3/jre/jre/lib/security/cacerts
lrwxrwxrwx 1 root root     27 Aug 12 14:18 /usr/lib/jvm/java-10-oracle/lib/security/cacerts -> /etc/ssl/certs/java/cacerts
-rw-r--r-- 1 root root 113367 Aug 12 14:18 /usr/lib/jvm/java-10-oracle/lib/security/cacerts.original
lrwxrwxrwx 1 root root     27 Jul 22 15:09 /usr/lib/jvm/java-8-oracle/jre/lib/security/cacerts -> /etc/ssl/certs/java/cacerts
-rw-r--r-- 1 root root 114757 Jul 22 15:09 /usr/lib/jvm/java-8-oracle/jre/lib/security/cacerts.original

My environment vars related to Java -

sj@darkstar:~$ set | grep -i java

Re: Can't git [message #1793722 is a reply to message #1793674] Tue, 14 August 2018 14:45 Go to previous messageGo to next message
Nitin Dahyabhai is currently offline Nitin DahyabhaiFriend
Messages: 3756
Registered: July 2009
Senior Member

Which tarball did you download?

Nitin Dahyabhai
Eclipse Web Tools Platform
Re: Can't git [message #1793740 is a reply to message #1793722] Wed, 15 August 2018 00:34 Go to previous message
Steve Jensen is currently offline Steve JensenFriend
Messages: 2
Registered: August 2018
Junior Member
Nitin Dahyabhai wrote on Tue, 14 August 2018 14:45
Which tarball did you download?

Filename eclipse-php-photon-R-linux-gtk-x86_64.tar.gz
md5sum (yeah, I know...) d435b36775a8f22c130bedf1d166a07d

But, the issue is partially resolved, so I'm going to ask this one to be closed and I'll open a new, more direct post.

Since my mint install is relatively fresh I booted up a new install in a vm and tried with various java versions.

In short, with both the oracle-java8 and oracle-java10 packages from the webupd8 team, the SSL error occurs.

I downloaded the .tar.gz that oracle provides for Java 10, extracted it to /opt and set up my environment vars -

export PATH=/opt/jdk-10.0.2/bin:$PATH
export JAVA_HOME=/opt/jdk-10.0.2

And it works to connect over SSL - so at least I can start learning now.
Previous Topic:SVN Connectors not working
Next Topic:Error: Program "arm-none-eabi-objcopy" not found in PATH
Goto Forum:

Current Time: Fri Jul 10 11:13:07 GMT 2020

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

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

Back to the top