Problem downloading v1.37.1 and running latest of v1 or v2

Issue #6 resolved
Dinesh Gurram created an issue

I’m trying to use this CLI in my Bitbucket pipeline to restore nuget packages for my .net core codebase.

When I added this to my pipeline step:

- pipe: jfrog/jfrog-setup-cli:1.0.0
- source ./jfrog-setup-cli.sh
- jfrog rt dotnet restore

it tried to use version 1.37.1 and gave me the following error:

[Error] illegal base64 data at input byte 119

Initially this seemed like a download problem but it seems to be something further along.

I can see from https://bitbucket.org/jfrog/jfrog-setup-cli/src/master/pipe/jfrog-setup-cli.sh that I just needed to set the JFROG_CLI_VERSION env var to push it to the latest v1 version. I created a JFROG_CLI_VERSION variable and set it to 1.9.0 but this time I got the following error:

+ jfrog rt dotnet restore
No help topic for 'dotnet'

I also tried to set the JFROG_CLI_VERSION variable to v2 and again it was able to download, but it has a problem in https://bitbucket.org/jfrog/jfrog-setup-cli/src/master/pipe/jfrog-setup-cli.sh on this line:

jfrog rt config import ${!name}

Should this instead be:

jfrog config import ${!name}

It seems the CLI setup script is not compatible with v2?

I then tried to work around the problem by not using the pipe but running effectively the same commands. So I changed my steps to:

- curl -XGET https://releases.jfrog.io/artifactory/jfrog-cli/${JFROG_CLI_VERSION}/[RELEASE]/jfrog-cli-linux-amd64/jfrog -L -k -g > jfrog
- chmod u+x jfrog
- mv ./jfrog /usr/bin
- jfrog config import ${JF_ARTIFACTORY_TOKEN}
- jfrog rt dotnet restore

But this gives me a completely different strange error on jfrog config import ${JF_ARTIFACTORY_TOKEN}:

+ jfrog config import ${JF_ARTIFACTORY_TOKEN}
/usr/bin/jfrog: line 5: syntax error near unexpected token `]'
/usr/bin/jfrog: line 5: `  } ]'

I’ve checked the value of JF_ARTIFACTORY_TOKEN - locally (on a mac using the mac version of the CLI) I am able to import it successfully.

Please help. This seems quite unstable right now.

Comments (8)

  1. Omer Zidkoni

    Hey @{5b226024a7d6752d8e1949a3} , @Senthilnathan , @Simon Schmid and thank you for your patience and for letting us know about this issue.

    We are currently upgrading the JFrog CLI pipe to the latest version (v2), which should also resolve your issue. Please do not hesitate to contact us if you have any further questions.

  2. Rohit Kumar

    I'm also facing similar issue while using pipe: jfrog/jfrog-setup-cli:2.0.0

    The jf executable was installed in /usr/local/bin
    'jf intro' is not a jf command. See --help
    13:02:26 [Error] illegal base64 data at input byte 6
    

  3. Omer Zidkoni

    Hi @Rohit Kumar , thank you for informing us of this issue. Could you please share the YAML file and your steps? Also, please add the following environment variable:

    "JF_CLI_LOG_LEVEL" with the value "DEBUG" and attach the updated logs so we can investigate further. Thank you.

  4. Log in to comment