Closed pschoepf closed 4 years ago
Thanks for this suggestion.
TBH, I don't fully understand the use case, but that's not to say this couldn't be added. Give me some time to investigate this further.
I think the PR as it stands could do with a little refactoring, so if you could submit this a draft PR, then it would make it easier to work with.
Some environments (especially in larger enterprise) might require additional authentication credentials via http headers or cookies. In my case one needs to send an additional cookie for each request which is obtained via multi-factor-auth. I have seen similar cases for others. With git this is normally easy to achieve using the http.extraheader config option. I added a small hook to be able to set this via system environment variable. I also initially thought about adding this as part of the preferences or authentication dialog but since this is kind of special feature and the MFA cookie might change every day it is probable the easiest way to go via env variables. IN addition I also added a similar feature for the http user agent since our reverse proxy configuration does not seem to allow JGit user agents.