Better error message for bad user input, maybe?
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 35/100
- Tipo de issue
- Error
- Claridad
- Bastante claro
- Estado de actividad
- Estancado
- Stack tecnológico
- typescript
- Área
- authentication, cli
Línea de trabajo
Comienza en login.ts y reproduce el flujo de inicio de sesión de caprover informado con example.com cuando la máquina usa captain.example.com; después, inspecciona cómo se muestra el error de hostname/certificate. Se considera terminado cuando la entrada incorrecta produce un mensaje o una advertencia claros y accionables, según lo seleccione el maintainer.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Maybe I'm incredibly stupid and dense but I took the prompt of It is captain.[your-captain-root-domain] : to mean I should not include the "captain" part. I know after reading it a closely it doesn't say that but I'd like to think at least one other person had this issue. The error you get is:
I've replaced the actual values with placeholders. Assume I have a caprover instance at captain.example.com with a wildcard DNS on *.example.com
❯❯❯ caprover login
Login to a CapRover Machine
?
Enter address of the CapRover machine.
It is captain.[your-captain-root-domain] : example.com
? Is HTTPS activated for this CapRover machine? Yes
? Enter your password: [hidden]
? Enter a name for this Captain machine: dev1
Something bad happened. Cannot save "dev1"
Error: Hostname/IP doesn't match certificate's altnames: "Host: example.com. is not in the cert's altnames: DNS:captain.example.com"
I started to think login.ts could be edited to check for "captain." at the start of the URL but I'm not sure if it's possible to change the url caprover admin is served over and if it could be changed it would break the CLI for those people. Maybe not if you just showed a warning message 1 time on login "Warning: Most CapRover installations start with 'captain.' or something like that. The other option that comes to mind is catch that specific error and only then show the warning (or silently add it yourself to see if that works after you see that error).
The obvious "third option" is to do nothing, which is perfectly reasonable seeing how "login" happens only once, or handful of times at most per person and once you know you won't make the same mistake twice.
As someone used this back when it was called Captain Duck Duck (but never used the cli till now) I was starting to think it was some issue in the update/migration (I've had enough issues with Ghost blog's updates...). I was close to uninstalled CR and reinstalling it fresh to see if that helped. Thankfully I found a post about this error, not related to CR, and attempted to suppress it only to get a different error that triggered something in my brain to attempt throwing "captain" on the front of my URL.
If you do pick the third option at least this issue should point people in the right direction if they are similarly challenged at stopping to full read a prompt before continuing.
- Lenguaje dominante
- TypeScript
- Estrellas
- 78
- Forks
- 43
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Preparar el entorno
- Incluye un Dockerfile o un archivo de Docker Compose
- Tiene una plantilla de pull request
- Sin guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de caprover/caprover-cli
-
Dificultad 3/5 1-2 días Aptitud para principiantes 35/100
caprover/caprover-cli#155 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 58/100
caprover/caprover-cli#153 ·
-
Dificultad 4/5 3-5 días Aptitud para principiantes 35/100
caprover/caprover-cli#148 ·
-
Dificultad 3/5 1-2 días Aptitud para principiantes 38/100
caprover/caprover-cli#144 ·
-
Dificultad 4/5 3-5 días Aptitud para principiantes 45/100
caprover/caprover-cli#143 · 1 reacción ·
Todos los issues de caprover/caprover-cli
Issues similares
-
Add: GTrekkerAbiertocheck:passed streams:add
Dificultad 1/5 Menos de una hora Aptitud para principiantes 72/100
Los mantenedores suelen responder en 1 día
-
area: ui Bug Payload OSS
Dificultad 1/5 Menos de una hora Aptitud para principiantes 88/100
payloadcms/payload#19839 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
Los mantenedores suelen responder en 1 día
-
external
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
ClickHouse/ClickStack#3761 ·
Los mantenedores suelen responder en 1 día
-
fix(auth): add the email OTP verification step to Pollar loginPosiblemente ocupada @akansnoro la tomó hoy. AbiertoStellar Wave
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
safetrustcr/dApp-SafeTrust#584 · 10 comentarios ·
Los mantenedores suelen responder en 1 día