简体   繁体   中英

failed to publish artifact with JFrog CLI

after upgrade to version jfrog version 1.38.0 we got the following error when trying to upload a tgz file to artifactory:

09:48:31  > Task :addRepo
09:48:31  >>> Adding repo to push charts
09:48:32  
09:48:32  > Task :publish FAILED
09:48:32  >>> Pushing charts to repo
09:48:32  >>> Pushing 'tag-service-1.11.4.tgz'
09:48:32  [Error] Artifactory response: 400 Bad Request
09:48:32  {
09:48:32    "error": "invalid_request",
09:48:32    "error_description": "User token:**** can only create user token(s) for themselves (requested: ****)"
09:48:32  }

with version 1.26.2 it works with no errors.

here is our relevant code

project.exec {
    commandLine 'jfrog', 'rt', 'config', "--url=${artifactory_url}",
            "--user=${artifactory_user}", "--password=${artifactory_password}",
            '--enc-password=false', 'artifactory'
}

    project.exec {
        workingDir project.projectDir.path
        commandLine 'jfrog', 'rt', 'u', chart.name, "${helm_chart_repo}"
    }

any idea?

Thanks to @EyalBenMoshe, I added the flag --basic-auth-only that solve the problem

Version 1.38.1 of JFrog CLI includes a fix for this issue.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM