[ 
https://issues.apache.org/jira/browse/CAMEL-18646?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17628310#comment-17628310
 ] 

Gilvan Filho commented on CAMEL-18646:
--------------------------------------

Hi [~Federico Mariani] 

I made some tests with that and I was able to pass a .gitconfig like file to be 
used as custom config through custom System Reader as exposed in Stack 
Overflow. That was done passing to endpoint a new query parameter (String) with 
path to a .gitconfig file. That way file could be on OS dirs or on resource 
folder. With that you could override all git configs as you want. But this is 
not mandatory. If user doesn`t provide that file camel-git will load that from 
users home folder as default behavior of JGit does.
{code:java}
from("git://repo?gitConfigFile=/tmp/gitconfig").to(...) //that way will load 
from OS dirs
from("git://repo?gitConfigFile=gitconfig").to(...) //that way will load from 
resources folder
from("git://repo").to(...) //that way will load from users home dir as 
default{code}
Said that, is still possible allows user to provide only some desired 
configurations through endpoint query params and override them in loaded 
configuration no matter if that was default or from a provided through 
gitConfigFile endpoint query param. But here I think we need pay attention in 2 
points:
 * There are a lot of options as exposed 
[here|https://git.eclipse.org/r/plugins/gitiles/jgit/jgit/+/refs/heads/master/Documentation/config-options.md].
 To allow the user provide all could turn things hard. Maybe defining some 
settings that will be exposed this way is a simpler way to do that.
 * We need to care about side effects avoiding configs made in one endpoint 
affect others. I will do some tests with that.

With that two things users will have great flexibility to config as they needs.

What do you think about?

> camel-git - Provide custom configuration
> ----------------------------------------
>
>                 Key: CAMEL-18646
>                 URL: https://issues.apache.org/jira/browse/CAMEL-18646
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-git
>    Affects Versions: 3.19.0
>            Reporter: Federico Mariani
>            Priority: Major
>
> let camel users provide a custom git configuration, for example, disable SSL 
> verification.
> https://git.eclipse.org/r/plugins/gitiles/jgit/jgit/+/refs/heads/master/Documentation/config-options.md



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to