Better error message for bad user input, maybe?
还没有人认领这个 Issue。
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 35/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 停滞
- 技术栈
- typescript
- 领域
- authentication, cli
调研方向
从 login.ts 开始,当机器使用 captain.example.com 时,使用 example.com 重现报告的 caprover 登录流程,然后检查 hostname/certificate 错误是如何呈现的。当错误输入会导致清晰且可采取行动的消息或警告(由 maintainer 选择)时,即视为完成。
由索引模型根据 Issue 内容生成。
描述
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.
- 主要语言
- TypeScript
- 星标
- 78
- 派生
- 43
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
- 提供 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 没有贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
caprover/caprover-cli 的其他 Issue
-
难度 3/5 1-2 天 新手友好度 35/100
caprover/caprover-cli#155 ·
-
难度 2/5 1-3 小时 新手友好度 58/100
caprover/caprover-cli#153 ·
-
难度 4/5 3-5 天 新手友好度 35/100
caprover/caprover-cli#148 ·
-
难度 3/5 1-2 天 新手友好度 38/100
caprover/caprover-cli#144 ·
-
难度 4/5 3-5 天 新手友好度 45/100
caprover/caprover-cli#143 · 1 个 reaction ·
查看 caprover/caprover-cli 的全部 Issue
相似的 Issue
-
Add: GTrekker未关闭check:passed streams:add
难度 1/5 1 小时以内 新手友好度 72/100
维护者通常 1 天内回复
-
area: ui Bug Payload OSS
难度 1/5 1 小时以内 新手友好度 88/100
payloadcms/payload#19839 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 85/100
维护者通常 1 天内回复
-
external
难度 2/5 1-3 小时 新手友好度 72/100
ClickHouse/ClickStack#3761 ·
维护者通常 1 天内回复
-
fix(auth): add the email OTP verification step to Pollar login可能已有人在做 @akansnoro 今天认领。 未关闭Stellar Wave
难度 2/5 1-3 小时 新手友好度 74/100
safetrustcr/dApp-SafeTrust#584 · 10 条评论 ·
维护者通常 1 天内回复