title: Gradle build failing to get dependency from custom maven repository
body: <p>I have created a custom maven repo on BitBucket following the <a href="https://bitbucket.org/neil_rubens/rapidminer_maven-repo/wiki/Home" rel="noreferrer">link</a>. When trying to use the dependencies in my android project using Gradle I am getting following error </p>
  
  <pre><code>Executing tasks: [:app:compileDebugJava]
  
  Configuration on demand is an incubating feature.
  Relying on packaging to define the extension of the main artifact has been deprecated and is scheduled to be removed in Gradle 2.0
  Checksum missing at https://bitbucket.org/test/maven-repo/raw/master/repository/com/test/com/testCommon/1.0/testCommon-1.0.pom.sha1 due to: For input string: "&lt;!"
  Download https://bitbucket.org/test/maven-repo/raw/master/repository/com/test/com/testCommon/1.0/testCommon-1.0.pom
  
  [Fatal Error] testCommon-1.0.pom:2:10: Already seen doctype.
  
  Checksum missing at https://bitbucket.org/test/maven-repo/raw/master/repository/com/android/support/support-v4/20.0.0/support-v4-20.0.0.pom.sha1 due to: For input string: "&lt;!"
  Download https://bitbucket.org/test/maven-repo/raw/master/repository/com/android/support/support-v4/20.0.0/support-v4-20.0.0.pom
  
  [Fatal Error] support-v4-20.0.0.pom:2:10: Already seen doctype.
  
  Checksum missing at https://bitbucket.org/test/maven-repo/raw/master/repository/com/android/support/support-annotations/20.0.0/support-annotations-20.0.0.pom.sha1 due to: For input string: "&lt;!"
  Download https://bitbucket.org/test/maven-repo/raw/master/repository/com/android/support/support-annotations/20.0.0/support-annotations-20.0.0.pom
  
  [Fatal Error] support-annotations-20.0.0.pom:2:10: Already seen doctype.
  
  FAILURE: Build failed with an exception.
  
  * What went wrong:
  A problem occurred configuring project ':app'.
  &gt; Could not resolve all dependencies for configuration ':app:_debugCompile'.
     &gt; Could not resolve com.test.com:testCommon:1.0.
       Required by:
           SettingsAid:app:unspecified
        &gt; Could not parse POM https://bitbucket.org/test/maven-repo/raw/master/repository/com/test/com/testCommon/1.0/testCommon-1.0.pom
           &gt; Already seen doctype.
  </code></pre>
  
  <p><strong>I have changed the link.</strong> But opening the link directly returns the checksum. </p>
  
  <p>Below is my build.gradle </p>
  
  <pre><code>apply plugin: 'com.android.application'
  apply plugin: 'maven'
  android {
      compileSdkVersion 19
      buildToolsVersion "20.0.0"
  
      defaultConfig {
          applicationId "com.test.sampleapp"
          minSdkVersion 11
          targetSdkVersion 19
      }
  
      buildTypes {
          release {
              runProguard false
              proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
          }
      }
  }
  repositories {
      mavenCentral()
      maven {
          credentials {
              username "test@gmail.com"
              password "test"
          }
          url "https://bitbucket.org/test/maven-repo/raw/master/repository/"
      }
  }
  dependencies {
      compile 'com.android.support:appcompat-v7:20.+'
      compile 'com.test.com:testCommon:1.0'
      compile files('libs/GoogleAdMobAdsSdk-6.4.1.jar')
  }
  </code></pre>
  
  <p>I am not sure what I am doing wrong here. I have also followed this <a href="http://www.gradle.org/docs/current/userguide/dependency_management.html" rel="noreferrer">link</a>. Can anybody help me in fixing this.</p>
  
  <p>Update 1:</p>
  
  <p>When I checked ~.gradle folder, even after giving the credentials it is not logging in and saving the full page. When I changed my repo from <strong>private</strong> to <strong>public</strong> the code started working. But I do not want to make my repo public. How to make gradle to use the login credentials passed?</p>
  
  <p>Thanks.</p>