1. git

git config --global http.proxy http://proxyuser:proxypwd@proxy.server.com:8080

2. gradle
Scenario build.gradle example:
      repositories {
         mavenCentral()
      }

      dependencies {
         compile "joda-time:joda-time:2.2"
  }
When running gradle build, it fails with Connect to https://repo1.maven.org/maven2/joda-time/joda-time/2.2/ timeout

Solution: you can put a file named gradle.properties under your project direcory (or in the Gradle home directory), and put the following content inside:
      systemProp.https.proxyHost=yourProxyxxx
      systemProp.https.proxyPort=xxx
      systemProp.https.proxyUser=xxx
      systemProp.https.proxyPassword=xxx
Notice that http doesnot work for this case ORZ...(why? #TODO)

相关文章:

  • 2021-12-07
  • 2021-06-21
  • 2022-12-23
  • 2021-07-31
  • 2021-05-22
  • 2021-09-23
  • 2022-12-23
猜你喜欢
  • 2022-02-22
  • 2022-02-07
  • 2021-07-20
  • 2022-03-09
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案