When I click "Set Me Up" in Artifactory is generates a gradle.properties file something like this:
artifactory_user=my_artifactory_user
artifactory_password=WAklvc9LXWDsVcoVILbKyebkQG5uBxos6rIrmi8HjMTB3xicLJbxstmEQwRwIoGN6pBnK3T91I
artifactory_contextUrl=https://artifactory.company.com/artifactory
However, when I run ./gradlew artifactoryDeploy
I get this error:
> Task :artifactoryDeploy FAILED
Could not build the build-info object.
org.jfrog.build.util.VersionException: Error occurred while requesting version information: Response message: {
"errors" : [ {
"status" : 401,
"message" : "Bad credentials"
} ]
}
...
stacktrace
...
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':artifactoryDeploy'.
> java.io.IOException: Could not publish build-info: Error occurred while requesting version information: Response message: {
"errors" : [ {
"status" : 401,
"message" : "Bad credentials"
} ]
}
I'm confused because Artifactory is generating this encrypted password but the docs use an example with plain text. https://www.jfrog.com/confluence/display/JFROG/Working+With+Gradle#WorkingwithGradle-ConfiguringGradle
Is the artifactory_password
supposed to be encrypted like this or is it supposed to be plain text?
The artifactory_password
parameter can be used for:
If you are getting a Bad credentials error, one of the possible reasons is using an encrypted password when Artifactory is configured with Password Encryption Policy set to Unsupported (not respecting encrypted passwords).
A few things you can do to debug this issue: