title: Gradle - Permission denied: connect
body: <p>I am receiving the following error when gradle checks maven for dependencies:  </p>
  
  <pre><code>Error transferring file: Permission denied: connect
  </code></pre>
  
  <p>I have found that the issue may be related to a <a href="http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=7077696" rel="nofollow">known bug</a> in JDK 1.7 related to IPv6.  The workaround, is to set <code>-Djava.net.preferIPv4Stack=true</code> in the Java VM options.</p>
  
  <p>I have done this, and still receive the same error.  I have tried setting every possible environment parameter I can think of, including MAVEN_OPTS, GRADLE_OPTS, _JPI_VM_OPTIONS, JAVA_OPTS, etc.  Nothing appears to work.  Could I be overlooking something simple here? </p>