Maemo Garage Git repo and Eclipse IDE

I like Eclipse IDE for being flexible enough, free, and open source solution to handle several programming languages I write in. I also like Git - a distributed version control system. For being git to use, and keen to not shit its files and directories all over the workspace. And I like them working together with help of EGit - an Eclipse Git plug-in (by Shawn Pearce).

Tonight I was going to add my recently emerged Maemo project to Eclipse workspace on my laptop. I started Eclipse, opened EGit, and tried to import my project from the Garage. But I can’t. I faced a problem to connect the repository since it was secured with SSL, but its certificate was not trusted by my system.

Here is the solution that worked for me:

First of all, get the public certificate used by Maemo Garage to protect connections. I wasn’t able to find the certificate on the server and ended dumping one to a file right from a session.

$ openssl s_client -connect git.maemo.org:443 > dump.txt

Hit Ctrl-C to break the session otherwise you could wait forever.

From the file remove all unnecessary lines, except the certificate part.

$ sed -ne '/----BEGIN/,/----END/p' dump.txt > cert.pem

Now you need to import the certificate to Java’s keystore.

$ sudo keytool -import -file cert.pem -alias git.maemo.org -keystore $JAVA_HOME/jre/lib/security/cacerts
Enter keystore password:  changeit
Trust this certificate? [no]: yes

Restart Eclipse and try to connect the repository once more. This time it should work.

Comments (1)

HeadLess almost 5 years ago

Thanks! Just what I was looking for. :)