Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jgit-dev] AccessControlException for .gitconfig file

I am going to be running multiple instances of an application (each using JGit) in a production environment on a server.

Developers will be modifying this application locally and I would like them to have the same environment on their machine as is running on the server. Giving the JVM access to .gitconfig could cause JGit to exhibit different behavior locally as it would be pulling in git settings from the developer's machine.

Also, a user's .gitconfig/.gitignore/excludesfile doesn't really make sense on a server because there is no user. Each instance is confined to its own directory and giving each JVM access to ${user.home} seems like it could pose a security risk.


On Fri, Oct 16, 2015 at 2:48 PM, Matthias Sohn <matthias.sohn@xxxxxxxxx> wrote:
On Fri, Oct 16, 2015 at 11:23 PM, Matt C <jgitquestion@xxxxxxxxx> wrote:
Hello,

I am trying to find a solution to an AccessControlException with the .gitconfig, .gitignore, and excludesfile. I do not want to give the JVM read rights to any of these files, but it seems like JGit requires it. I see that the code already handles the case where these files do not exist, but not the case where the files exist and JGit doesn't have read access to them.

why don't you want to give the JVM read rights for these files ?
 
I have come up with a simple solution that catches these AccessControlExceptions and handles them the same way that it does when the file does not exist.

Is anyone familiar with a better workaround for this issue? and is this a feasible change that could be integrated into JGit, I really do not want to fork?

Thanks for your time,
Matt

_______________________________________________
jgit-dev mailing list
jgit-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jgit-dev



Back to the top