I want to pass proxy authentication (username and password) along with proxyhost and proxyport
currently Android sdkmanager supports --proxy_host and --proxy_port (in command line)
our proxy server has authentication also (username and password)
Thanks in advance.
On Linux, you can export proxy environment variable, then run sdkmanager command
export http_proxy=http://[USERNAME]:[PASSWORD]@[PROXY_ADDRESS]:[PROXY_PORT]
For https proxy
export https_proxy=https://[USERNAME]:[PASSWORD]@[PROXY_ADDRESS]:[PROXY_PORT]
If the above command does not work, try
_JAVA_OPTIONS="-Dhttp.proxyHost=[PROXY_ADDRESS] -Dhttp.proxyPort=[PROXY_PORT] -Dhttp.proxyUser=[USERNAME] -Dhttp.proxyPassword=[PASSWORD]" bash -c "sdkmanager '[SDK_COMPONENT]'"
This is because command sdkmanager will run as a normal java application. It will apply the options you specified in the command line.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With