Open bygui86 opened 2 years ago
@bygui86 try dropping the https://
.
Even if that fixes it, I think this error deserves an issue. It's not at all clear what the user should do.
@crenshaw-dev it worked with the external link, thanks a lot!!
Sorry but in the doc it's mentioned the port-forward and the example says to use https://localhost:8080
.
Anyway the error message is not clear at all :(
@bygui86 you bet!
Can you point to the place in docs where we're adding the https://
? Just did a quick search and didn't see it.
@crenshaw-dev of course.
In the section Port forwarding of the Getting started guide, it's mentioned
The API server can then be accessed using https://localhost:8080
In the section Login Using The CLI right below, it's mentioned the command to login with argocd CLI
argocd login
But there is no further info (or example) about possible values of ARGOCD_SERVER.
And the note right next to it says
The CLI environment must be able to communicate with the Argo CD API server. If it isn't directly accessible as described above in step 3, you can tell the CLI to access it using port forwarding through one of these mechanisms: 1) add --port-forward-namespace argocd flag to every CLI command; or 2) set ARGOCD_OPTS environment variable: export ARGOCD_OPTS='--port-forward-namespace argocd'.
To be honest those sections are quite confused, not giving enough and proper info.
Ran into the same issue as well. This doesn't resolve the problem but a workaround folks can use until this is addressed in the docs is
argocd login --insecure localhost:8080
I'd be happy to review a docs PR.
I'd also love to see a PR modifying the CLI to detect if a schema is specified and then throw a more friendly error.
Maybe this is a separate bug but the CLI also doesn't seem to be able to parse an address that uses both a port and a route.
$ argocd login --insecure localhost:6080/argocd
FATA[0000] dial tcp: address tcp/6080/argocd: unknown port
As such, the following workaround doesn't work for me:
Ran into the same issue as well. This doesn't resolve the problem but a workaround folks can use until this is addressed in the docs is
argocd login --insecure localhost:8080
My workaround was to use the portforwarding arguments:
argocd login --username user --password $ARGOCD_PW --port-forward --plaintext --port-forward-namespace argocd
Checklist:
argocd version
.Describe the bug
argocd login <URL>
doesn't work anymore. I have ArgoCD exposed on internet, so I tried with the specific URL and through "kubectl port-foward" but nothing works.To Reproduce
Using the ArgoCD external URL:
Using port forwarding:
I tried also the flag
--port-forward-namespace argocd
but without success.Expected behavior
argocd login
working as expected with ArgoCD exposed over internet or reachable through "kubectl port-forward".Screenshots
No relevant screenshots.
Version
Logs
No relevant logs.