How to enable preemptive basic authentication for an ivy repository?

I want to use a private github repository as an ivy artifact repository but github https raw urls require preemptive basic authentication (it replies with ‘resource not found’ instead of ‘unauthorized access’ if the basic authentication information is not provided).

I’ve seen that apache http client which I assume is the one being used by gradle supports preemptive authentication: http://hc.apache.org/httpclient-3.x/authentication.html

Is there any way to enable it at the build.gradle level somehow?

Thanks in advance!