You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -37,6 +37,15 @@ fun <C : GitCommand<T>, T, E : TransportCommand<C, T>> E.applyCredentials(userna
37
37
return cmd
38
38
}
39
39
40
+
fun <C:GitCommand<T>, T, E : TransportCommand<C, T>> E.configureHttpProxy(): E {
41
+
val proxy =System.getenv("MODELIX_HTTP_PROXY") ?:returnthis
42
+
// see https://github.com/openjdk/jdk/blob/e783c524c17e1d1a3fff4b6370e222134e66edc8/src/java.base/share/classes/sun/net/spi/DefaultProxySelector.java#L80
43
+
// and https://github.com/eclipse-jgit/jgit/blob/a762badfcecd3c200bb29b8ad5806546c7db8eaa/org.eclipse.jgit/src/org/eclipse/jgit/transport/TransportHttp.java#L292
44
+
System.setProperty("http.proxy", proxy)
45
+
System.setProperty("https.proxy", proxy)
46
+
returnthis
47
+
}
48
+
40
49
/**
41
50
* The credentialsProvider only works with WWW-Authenticate: Basic, but not with WWW-Authenticate: Negotiate.
0 commit comments