[GRADLE-1222] Cannot authenticate on maven repository on Ubuntu server, with gradle.properties in {home}/.gradle directory. Created: 17/Nov/10  Updated: 10/Feb/17  Resolved: 10/Feb/17

Status: Resolved
Project: Gradle
Affects Version/s: 0.9
Fix Version/s: None

Type: Bug
Reporter: Guy Brand Assignee: Unassigned
Resolution: Won't Fix Votes: 0


We have five different build agents. Two Ubuntu, two Windows XP/7 and one MAC. We save our credentials for authenticating on our nexus server(maven repository) in the gradle.properties in the home directory on each build agent.

build.gradle for authenticating
    repositories {
        org.apache.ivy.util.url.CredentialsStore.INSTANCE.addCredentials(nexusAuthRealm, nexusAuthHost, nexusAuthUser, nexusAuthPassword);
        mavenRepo urls: nexusURL

The credentials are replaced properly inside the build.gradle (checked with system outs) and on the windows and Mac agents it will authorize successfully. BUT:

On both ubuntu agents we get unresolved dependencies. It looks like it can't authorize on our nexus server (with correct credentials):

try to get credentials for: {realm}@{domain.com}
[08:51:43]: 08:51:43.031 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] authentication: k='{realm}@{domain.com}' c='null'
[08:51:43]: 08:51:43.031 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] HTTP response status: 401 url=https://domain.com/nexus/content/groups/public/com/intellij/annotations/9.0.2/annotations-9.0.2.jar
[08:51:43]: 08:51:43.031 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] CLIENT ERROR: Unauthorized url=https://domain.com/nexus/content/groups/public/com/intellij/annotations/9.0.2/annotations-9.0.2.jar
[08:51:43]: 08:51:43.031 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] https://ci.canoo.com/nexus/content/groups/public: resource not reachable for com/intellij#annotations;9.0.2: res=https://domain.com/nexus/content/groups/public/com/intellij/annotations/9.0.2/annotations-9.0.2.jar
[08:51:43]: 08:51:43.032 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] https://domain.com/nexus/content/groups/public: no ivy file nor artifact found for com.intellij#annotations;9.0.2
[08:51:43]: 08:51:43.032 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] WARN: module not found: com.intellij#annotations;9.0.2
[08:51:43]: 08:51:43.032 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] WARN: ==== clientModule: tried

But when we put the gradle.properties file inside the project, not in the home directory, it runs flawlessly.

Our Ubuntu server info:

Linux server 2.6.31-18-server #55-Ubuntu SMP Fri Jan 8 15:51:55 UTC 2010 x86_64 GNU/Linux

Do you have any idea?

Best regards,


Comment by Benjamin Muschko [ 15/Nov/16 ]

As announced on the Gradle blog we are planning to completely migrate issues from JIRA to GitHub.

We intend to prioritize issues that are actionable and impactful while working more closely with the community. Many of our JIRA issues are inactionable or irrelevant. We would like to request your help to ensure we can appropriately prioritize JIRA issues you’ve contributed to.

Please confirm that you still advocate for your JIRA issue before December 10th, 2016 by:

  • Checking that your issues contain requisite context, impact, behaviors, and examples as described in our published guidelines.
  • Leave a comment on the JIRA issue or open a new GitHub issue confirming that the above is complete.

We look forward to collaborating with you more closely on GitHub. Thank you for your contribution to Gradle!

Comment by Benjamin Muschko [ 10/Feb/17 ]

Thanks again for reporting this issue. We haven't heard back from you after our inquiry from November 15th. We are closing this issue now. Please create an issue on GitHub if you still feel passionate about getting it resolved.

Generated at Wed Jun 30 11:50:04 CDT 2021 using Jira 8.4.2#804003-sha1:d21414fc212e3af190e92c2d2ac41299b89402cf.