jenkins-x / jx

Jenkins X provides automated CI+CD for Kubernetes with Preview Environments on Pull Requests using Cloud Native pipelines from Tekton
https://jenkins-x.io/
Apache License 2.0
4.57k stars 787 forks source link

`jx create quickstart` fails with "error: No quickstarts match filter" #448

Closed jody-frankowski closed 5 years ago

jody-frankowski commented 6 years ago

On a fresh install of jenkins-x, jx create quickstart fails:

jx create quickstart
error: No quickstarts match filter

jx is from master and jenkins-x is installed on a fresh GKE cluster.

rawlingsj commented 6 years ago

@jody-frankowski what version of jx are you running?

jx version

jody-frankowski commented 6 years ago
NAME        VERSION
jx
Jenkins X   0.0.364
Kubernetes  v1.9.3-gke.0
Helm Client v2.8.2+ga802316
Helm Server v2.8.2+ga802316
Git         git version 2.16.2
jody-frankowski commented 6 years ago

And the same happens with jx 1.1.12:

~/jx create quickstart
error: No quickstarts match filter

~/jx version
NAME        VERSION
jx          1.1.12
Jenkins X   0.0.364
Kubernetes  v1.9.3-gke.0
Helm Client v2.8.2+ga802316
Helm Server v2.8.2+ga802316
Git         git version 2.16.2
rawlingsj commented 6 years ago

Ah I think I know what this is, did you run the jx create cluster or was that done by someone else?

When we create the cluster jx sets up a few yaml files under ~/.jx, in particular one called ~/.jx/gitAuth.yaml . I just renamed this and got your error.

So we need to have jx prompt to enter users git token and setup that file. Sounds like a bug we can fix. For now if you create a file ~/.jx/gitAuth.yaml and have it like this placing GITHUB_USERNAME and GITHUB_PERSONAL_ACCESS_TOKEN:

servers:
- url: github.com
  users:
  - username: GITHUB_USERNAME
    apitoken: GITHUB_PERSONAL_ACCESS_TOKEN
    bearertoken: ""
  name: GitHub
  kind: ""
  currentuser: GITHUB_USERNAME
defaultusername: GITHUB_USERNAME
currentserver: github.com

UPDATE the file to create is ~/.jx/gitAuth.yaml

rawlingsj commented 6 years ago

I'm working on a fix for this now BTW

jody-frankowski commented 6 years ago

I did jx install myself (The cluster was created with terraform, not by jx).

I had fiddled with this file in order to try and make our GHE work. jx indeed fails with a not too appropriate error when it can't authenticate to GitHub. Using only the --git* flags also doesn't seem to work when there is no gitAuth.yaml:

jx create quickstart --git-api-token=XXXX --git-username='jody-frankowski' --git-provider-url='github.com'
error: No quickstarts match filter

Anyway, I have made jx create quickstart (almost) work if I setup the gitAuth.yaml file properly :) However I'm not yet able to make it work with our GHE instance.

rawlingsj commented 6 years ago

@jody-frankowski jx 1.1.14 is available with a fix - would you mind checking it works ok for you please?

jody-frankowski commented 6 years ago

Thank you for the fix! However I don't think that this is completely fixed. When the git authentication fails, jx still replies with an unhelpful error message. Here are two runs with a failing one:

jx create quickstart
? Do you wish to use jody-frankowski as the git username to create the quickstart Yes
error: No quickstarts match filter

jx create quickstart
? Do you wish to use jody-frankowski as the git username to create the quickstart Yes
? select the quickstart you wish to create  [Use arrows to move, type to filter]
❯ golang-http
  node-http

Tested with jx version 1.1.16 and master.

rawlingsj commented 6 years ago

Ok great - glad to see you get the list now, I'll fix up that error message. Thanks!

jody-frankowski commented 6 years ago

I should mention that the failing test is with a valid gitAuth.yaml but an invalid api key. However I tested with no gitAuth.yaml and I was rightly prompted to input my username and api key, and jx rightly worked after (and also wrote the gitAuth.yaml file), so I guess the original issue is properly fixed so far :)

jstrachan commented 6 years ago

@jody-frankowski BTW you can also setup your github auth token via:

jx create git token -n github myuserName -t mytoken

or if you do:

jx create git token -n github myuserName

it should prompt you for the api token

jtnord commented 5 years ago

@jody-frankowski is this still an issue?

ccojocar commented 5 years ago

This seems to be an outdated issue.

galaxyNeha commented 3 years ago

Hey I am facing the issue again, related to "error: No quickstarts match filter"

Username for 'https://github.com': galaxyNeha Password for 'https://galaxyNeha@github.com': Where would you like to put this project The name you enter will be used as the prefix when creating your ML repos. For example: mymlproject-service and mymlproject-training. ? git owner: galaxyNeha ? git repository name: test1 Creating repository galaxyNeha/test1 ? select the quickstart you wish to create: machine-learning-quickstarts/ML-python-lightgbm-cpu error: No quickstarts match filter jx version version: 3.2.210 I have jx installed on k8s, I want to set up MLOps repositories(training and service) for deploying the model on our application.