jfrog-cli icon indicating copy to clipboard operation
jfrog-cli copied to clipboard

Cryptic error message during build-publish

Open s-geiger-si opened this issue 2 years ago • 4 comments

Describe the bug

I just tried to publish a build using the JFrog CLI and received an error message together with a 403 error that contained a cryptic token %!F(MISSING) in the message that makes the message difficult to understand.

Current behavior

{
  "errors": [
    {
      "status": 403,
      "message": "User [REDACTED] is not permitted to deploy 'group%!F(MISSING)project/0-12345678901234.json' into 'artifactory-build-info:group%!F(MISSING)project/0-12345678901234.json'."
    }
  ]
}

The token %!F(MISSING) is what I do not understand. I would either expect a litteral / (slash) or a ansi escaped %2F instead of this cryptic character sequence.

The strangely formatted message makes it difficult to understand if my user is really missing a certain permission, or if there is something wrong with the path of the build info that I am using.

Reproduction steps

Invoke with:

./jfrog rt build-publish --build-url=[REDACTED] '--env-include=*CI_*' '--env-exclude=*KEY*;*PASSWORD*;*TOKEN*;*SECRET*' group/project 0

Expected behavior

I would expect to see an error message which does not include the cryptic character sequence %!F(MISSING) and instead shows the actual url to which I am trying to deploy either with a literal / or an ansi escaped %2F

JFrog CLI version

2.28.1

Operating system type and version

Ubuntu 22.04

JFrog Artifactory version

7.41.7

JFrog Xray version

s-geiger-si avatar Oct 29 '22 16:10 s-geiger-si

FYI, seems other go projects such as eksctl have had similar issues. For reference see https://github.com/weaveworks/eksctl/issues/836#issuecomment-499282035

s-geiger-si avatar Oct 29 '22 17:10 s-geiger-si

I have recently also seen this message in another context:

10:15:33 [Info] Deploying build info...
10:15:33 [Error] server response: 403 Forbidden
{
  "errors": [
    {
      "status": 403,
      "message": "Not enough permissions to delete/overwrite artifact 'artifactory-build-info:<MODULE_NAME>%!F(MISSING)<MODULE_NAME>/123456789-12345678901234.json' (user: 'xxxxxxxx' needs DELETE permission)."
    }
  ]
}

s-geiger-si avatar May 28 '23 10:05 s-geiger-si

I had the same issue. You need to grant your user/group permissions to builds:

image

Select the Include All Builds in the By Pattern if you do not have any builds yet.

Next, give your user/group the permission to deploy builds:

image

lharzenetter avatar Jan 02 '24 10:01 lharzenetter

@s-geiger-si - Were you able to figure this out? I am encountering the same issue with the JFrog CLI.

eric-gonzalez-tfs avatar Jul 10 '24 21:07 eric-gonzalez-tfs