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

`jx login` command should validate that `--url` contains a well formed url (scheme://host) #2427

Closed
mikecirioli opened this Issue Dec 5, 2018 · 1 comment

Comments

Projects
None yet
2 participants
@mikecirioli
Copy link
Member

mikecirioli commented Dec 5, 2018

Summary

the jx login command does not validate that the value of the --url parameter is a well formed url, which can cause the command to fail (eventually). The value of --url should either be validated for a scheme, or we should silently default to https://.

Steps to reproduce the behavior

jx login --url some.host.name <-- NOTICE: no https://!

$ jx login --url core.jx.cd.jenkins-x.io
error: logging into the CloudBees application: onboarding user: executing onboarding request: Post core.jx.cd.jenkins-x.io/api/v1/users: unsupported protocol scheme ""

Jx version

The output of jx version is:

NAME               VERSION
jx                 1.3.627
jenkins x platform 0.0.2940
Kubernetes cluster v1.11.3-gke.18
kubectl            v1.12.2
helm client        v2.11.0+g2e55dbe
helm server        v2.11.0+g2e55dbe
git                git version 2.16.0
Operating System   Mac OS X 10.14.1 build 18B75

Kubernetes cluster

What kind of Kubernetes cluster are you using & how did you create it?
n/a

Operating system / Environment

n/a

Expected behavior

jx login command would tell me i didn't pass a valid url, or would silently default to adding https://

Actual behavior

command fails with:

error: logging into the CloudBees application: onboarding user: executing onboarding request: Post core.jx.cd.jenkins-x.io/api/v1/users: unsupported protocol scheme ""

rawlingsj added a commit to rawlingsj/jx that referenced this issue Dec 6, 2018

@rawlingsj

This comment has been minimized.

Copy link
Member

rawlingsj commented Dec 6, 2018

/assign rawlingsj

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment