If you can only download artifacts through a proxy, you need to configure it beforehand, like
scala-cli config httpProxy.address http://proxy.company.com
proxy.company.com by the address of your proxy.
https:// if your proxy is accessible via HTTPS.
If your proxy requires authentication, set your user and password with
scala-cli config httpProxy.user _encoded_user_
scala-cli config httpProxy.password _encoded_password_
_encoded_password_ by your actual user and password, following
the password option format. They should typically look like
command:command to run.
If you don't rely on proxies, but rather download artifacts through different Maven repositories, set those repositories like:
scala-cli config repositories.default https://first-repo.company.com https://second-repo.company.com
If you're fine directly downloading artifacts from the internet, but would rather have some repositories requests go through a repository of yours, configure mirror repositories, like
scala-cli config repositories.mirrors https://repo1.maven.org/maven2=https://repository.company.com/maven
To have all requests to a Maven repository go through a repository of yours, do
scala-cli config repositories.mirrors maven:*=https://repository.company.com/maven