Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,463,474
Community Members
 
Community Events
176
Community Groups

Jfrog not working with a token

Edited

hello,

 the pipeline can't reach artifactory while using a token.

JF_ARTIFACTORY_1 is a secret and is set to the token generated on a local machine by running "jf c export". The jfrog cli is from jfrog-cli-v2-jf-2.10.1-1.x86_64 rpm.

pipeline code:

push: &push
name: Push to Jfrog
script:
- apk add curl
- pipe: jfrog/jfrog-setup-cli:1.0.0
- source ./jfrog-setup-cli.sh
- jf rt ping
- jfrog rt ping --url https://XXXX.jfrog.io/artifactory --user xxxx --password xxx

 

jfrog rt ping - fails with 404

jfrog rt ping --url  - completes with "OK"

jf rt ping on a local machine returns "OK" too.

 

Update:

Downgrading the cli to 1.52 did not resolve the problem with the pipeline:

jfrog-cli-1.52.0-1.x86_64

jfrog -v
jfrog version 1.52.0
[aa@fedora utils]$ jfrog rt ping
OK

the token generated by cli v1 and v2  is identical.

Update 2:

setting repository variable :

JFROG_CLI_VERSION 1.9.0
broke the cli:
+ source ./jfrog-setup-cli.sh

Downloading version 1.9.0 of JFrog CLI...

% Total % Received % Xferd Average Speed Time Time Time Current

Dload Upload Total Spent Left Speed

0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0

0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0

75 12.7M 75 9906k 0 0 12.8M 0 --:--:-- --:--:-- --:--:-- 12.8M

100 12.7M 100 12.7M 0 0 16.4M 0 --:--:-- --:--:-- --:--:-- 170M

bash: /usr/bin/jfrog: No such file or directory
 

 

 

1 answer

0 votes
Pramodh M Community Leader Jan 11, 2022

Hi @Andrew Zyman 

Welcome to the Community!!

You either need to use an admin token in order to have the integration or the general account encrypted password in order to authenticate while you are using jfrog cli command

Thanks,
Pramodh

@Pramodh M 

thank you for the reply.

> .. admin token in order to have the integration or the general account encrypted password

what is the admin token?

what is the "general account"?

Pramodh M Community Leader Jan 11, 2022

Hi @Andrew Zyman 

Admin token reference here

https://www.jfrog.com/confluence/display/JFROG/Access+Tokens#AccessTokens-GeneratingAdminTokens

A general account is the one that you create as the service user in order to have the integration between different tools

Thanks,
Pramodh

Like Andrew Zyman likes this

Pramodh,

 thank you. This is helpful.

 

To clarify:

 a. pinging from a local machine - works.
      I can ping using user/pass or using stored configuration.

b. pinging from pipe when user/pass is used  - works

c. ping is failing from the pipe when the token generated on the local machine is used.

 

 

Now. I generated an admin user token :

Username XXX
Scope applied-permissions/admin api:*
Audience *@*
Expires In 3600 Seconds

I replaced the one in JF_ARTIFACTORY_1 with this admin token.

the new error:

source ./jfrog-setup-cli.sh
+ source ./jfrog-setup-cli.sh
Downloading version 1.37.1 of JFrog CLI...

% Total % Received % Xferd Average Speed Time Time Time Current

Dload Upload Total Spent Left Speed

0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0

0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0

0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0

100 19.0M 100 19.0M 0 0 19.9M 0 --:--:-- --:--:-- --:--:-- 19.9M

[Error] illegal base64 data at input byte 119

this is the same issue as mentioned in the still open ticket here (https://bitbucket.org/jfrog/jfrog-setup-cli/issues/6/problem-downloading-v1371-and-running)

Please advise.

Suggest an answer

Log in or Sign up to answer
TAGS

Atlassian Community Events