Hi all,
Very cool project you have here.
I am trying to figure out how to use JGIT library in my own Jetty servlet service. The problem I am having is connecting to remote repos via ssh. I can run the code on the same server as a pure java app (you know main() method), and it works fine. My .ssh/id_rsa is already set up (as is known_hosts) to connect to the git repo server I am working with (it's an internal one, not GitHub or the likes). So the code works.. but as soon as I try to run the exact same code in a running servlet (via a JAX-RS API method), it fails with unknow host, or Invalid Remote: origin errors.
I noticed you use JGIT in your project. So my subject is.. if I deploy the gitblit app, can I use the API of gitblit to manage the connection of remote git repos programatically to clone the repos or get specific files from the remote repos to a local path? If so, are there any examples showing how to use the gitblit API in this manner? I can't seem to find very good documentation (or any) describing how to use the API..just a downloaded .jar file.
To be clear, I am not looking to use gitblit to actually host git repos..but to use its library to pull remote git repos locally, either via clone, or otherwise. In fact, I only want a very specific set of files.. usually located in one directory within the remote repo.
Thank you for any help.. been pulling my hair out for a few hours trying to figure out why this works outside the servlet container but not inside. Only assumption is maybe because the servlet container runs as a service, the user it runs under doesn't have .ssh/ set up right. I set up a jetty user, but don't have a /home/jetty user.. so that may be the reason why. Either way. if this gitblit works, I am fine hosting it and using it's API to do this rather than reinventing the wheel.