Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Syntax error in template from "Setup Frogbot Using Azure Pipelines" #794

Open
mikeKuester opened this issue Dec 5, 2024 · 0 comments
Open
Labels
bug Something isn't working

Comments

@mikeKuester
Copy link

Describe the bug

The template "Scanning repository branches and fixing issues" in the documentation Setup Frogbot Using Azure Pipelines doesn't work, if someone wants to use user / password instead of the access token.

         env:
            # [Mandatory]
            # JFrog platform URL (This functionality requires version 3.29.0 or above of Xray)
            JF_URL: $(JF_URL)

            # [Mandatory if JF_USER and JF_PASSWORD are not provided]
            # JFrog access token with 'read' permissions for Xray
            JF_ACCESS_TOKEN: $(JF_ACCESS_TOKEN)

            # [Mandatory if JF_ACCESS_TOKEN is not provided]
            # JFrog user and password with 'read' permissions for Xray
            # JF_USER: $JF_USER
            # JF_PASSWORD: $JF_PASSWORD

            # [Mandatory]
            # Azure Repos personal access token with Code -> Read & Write permissions
            JF_GIT_TOKEN: $(JF_GIT_TOKEN)
            ...

The normal behavoir would be to add the # before the line with the JF_ACCESS_TOKEN and remove it for JF_USER and JF_PASSWORD, but this won't work ...

I got always an 401 error "Bad Credentials":

08:02:06 [Info] Running Frogbot "scan-repository" command
08:02:07 [Error] got unexpected server response while attempting to get JFrog Xray entitlements response for contextual_analysis:
server response: 401 Unauthorized
{
  "error": "Bad Credentials"
}

The problem is, that the brackets are missing in the commented lines. Please fix that in the docs.

            # --- This is the snippet from the template:
            # JF_USER: $JF_USER
            # JF_PASSWORD: $JF_PASSWORD

            # --- If a user only uncomments this lines, the usage of the variables has a syntax error!
            JF_USER: $JF_USER
            JF_PASSWORD: $JF_PASSWORD

            # --- You have to add the brackets: $(...)
            JF_USER: $(JF_USER)
            JF_PASSWORD: $(JF_PASSWORD)

Current behavior

Pipeline ends with error.

Reproduction steps

No response

Expected behavior

No response

JFrog Frogbot version

Package manager info

Git provider

Azure DevOps

JFrog Frogbot configuration yaml file

No response

Operating system type and version

JFrog Xray version

No response

@mikeKuester mikeKuester added the bug Something isn't working label Dec 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant