jx icon indicating copy to clipboard operation
jx copied to clipboard

Error when try to add jx-git-operator

Open Skreet2k opened this issue 3 years ago • 10 comments

jx version 3.2.188

I have baremetal k8s cluster. I try to install jx but at step - adding jx-operator i have error:

jx admin operator --username ** --token --url=

error: failed to add Jenkins X Labs chart repository: failed to add the repository 'jx3' with URL 'https://storage.googleapis.com/jenkinsxio/charts': failed to run '/home/k8s/.jx3/plugins/bin/helm-3.6.2 repo add jx3 https://storage.googleapis.com/jenkinsxio/charts' command in directory '.', output: 'Error: looks like "https://storage.googleapis.com/jenkinsxio/charts" is not a valid chart repository or cannot be reached: failed to fetch https://storage.googleapis.com/jenkinsxio/charts/index.yaml : 403 Forbidden'

Skreet2k avatar Sep 07 '21 17:09 Skreet2k

I have the same problem.

jx version 3.2.188

changed this line to master

Still not picking up the right helm repo.

dalwar23 avatar Sep 08 '21 09:09 dalwar23

I am also facing the same issue

chetancyberoi avatar Sep 08 '21 12:09 chetancyberoi

Check out this help thread on Moving Jenkins X v2 artifacts... the JX3 instructions are here

haysclark avatar Sep 08 '21 17:09 haysclark

on your computer: first add the helm repository

helm repo add jx3 https://jenkins-x-charts.github.io/repo
helm upgrade --install \
    --set url=$GITHUB_REPO_URL \
    --set username=$GITHUB_BOT_NAME \
    --set password=$GITHUB_BOT_TOKEN \
     -n jx-git-operator --create-namespace jxgo jx3/jx-git-operator

theyough avatar Sep 09 '21 10:09 theyough

helm repo add jx3 https://jenkins-x-charts.github.io/repo

Anyway command from instruction

jx admin operator --username ** --token ** --url=**

doesnt work

Skreet2k avatar Sep 09 '21 10:09 Skreet2k

helm repo add jx3 https://jenkins-x-charts.github.io/repo

Anyway command from instruction

jx admin operator --username ** --token ** --url=**

doesnt work

agree

theyough avatar Sep 09 '21 10:09 theyough

Check out this help thread on Moving Jenkins X v2 artifacts... the JX3 instructions are here

I try to do all in instruction. but can find only https://storage.googleapis.com/chartmuseum.jenkins-x.io and relpace with https://jenkins-x-charts.github.io/v2.

Still have error:

error: failed to add Jenkins X Labs chart repository: failed to add the repository 'jx3-0' with URL 'https://storage.googleapis.com/jenkinsxio/charts': failed to run '/home/k8s/.jx3/plugins/bin/helm-3.6.2 repo add jx3-0 https://storage.googleapis.com/jenkinsxio/charts' command in directory '.', output: 'Error: looks like "https://storage.googleapis.com/jenkinsxio/charts" is not a valid chart repository or cannot be reached: failed to fetch https://storage.googleapis.com/jenkinsxio/charts/index.yaml : 403 Forbidden'

Skreet2k avatar Sep 09 '21 10:09 Skreet2k

Check out this help thread on Moving Jenkins X v2 artifacts... the JX3 instructions are here

If I am already using Jenkins X Version 3 why would I need to move artifacts? Shouldn't this be already in the latest jx @haysclark

dalwar23 avatar Sep 10 '21 11:09 dalwar23

I don't think any local command will fix this. I suspect that the owner of the bucket accidentally the permissions. We will need to await their action.

CameronHudson8 avatar Sep 12 '21 22:09 CameronHudson8

I ended up taking a couple steps to fix this for my cluster (EKS). From the blog mentioned above(https://jenkins-x.io/blog/2021/08/26/moving-v2-artifacts/), it's clear that the error is related to charts moving locations (https://storage.googleapis.com/jenkinsxio/charts -> https://jenkins-x-charts.github.io/repo). More specifically, in the v3 users section, it calls out some specific details that helped.

Note: this was a new cluster, so it's not immediately clear to me if there's detriment to taking these chart from a live environment.

  1. noticed that the jx admin operator command was installing from a repo I didn't have added (jxgh). I did have this repo added locally, but as jx or jx3 instead of jxgh. I added it to my helm repo list as jxgh
helm repo list
...

jxgh       	https://jenkins-x-charts.github.io/repo
....
  1. After adding this, I was getting an error about the the jx-git-operator failing to install because the serviceaccount was being used by multiple helm releases.
  2. Removed the current helm release for the jx-git-operator -
helm uninstall jx-git-operator
  1. Next, i just reran the jx admin operator and it hung on starting some jx-boot jobs.
  2. From the blog post mentioned earlier, it mentioned doing a jx gitops upgrade to update all charts to their latest version. This changed a number of charts in the versionStream in the cluster repo. I opened a PR against the cluster repo with these changes and merged.

After this, the jx admin operator worked as expected.

tl;dr added some helm repos, uninstalled the jx-git-operator release, ran jx gitops upgrade.

smerck avatar Nov 11 '21 03:11 smerck