Better error message for bad user input, maybe?
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 35/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- typescript
- Lĩnh vực
- authentication, cli
Hướng nghiên cứu
Bắt đầu trong login.ts và tái hiện luồng đăng nhập caprover đã được báo cáo với example.com khi máy sử dụng captain.example.com, sau đó kiểm tra cách lỗi hostname/certificate được hiển thị. Được xem là hoàn tất khi đầu vào không hợp lệ dẫn đến một thông báo hoặc cảnh báo rõ ràng, có thể thực hiện hành động, theo lựa chọn của maintainer.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- TypeScript
- Star
- 78
- Fork
- 43
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
- Có Dockerfile hoặc tệp Docker Compose
- Có mẫu pull request
- Không có hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của caprover/caprover-cli
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 35/100
caprover/caprover-cli#155 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 58/100
caprover/caprover-cli#153 ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
caprover/caprover-cli#148 ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 38/100
caprover/caprover-cli#144 ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 45/100
caprover/caprover-cli#143 · 1 reaction ·
Tất cả issue của caprover/caprover-cli
Issue tương tự
-
Add: GTrekkerĐang mởcheck:passed streams:add
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày
-
area: ui Bug Payload OSS
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
payloadcms/payload#19839 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
Maintainer thường phản hồi trong vòng 1 ngày
-
external
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
ClickHouse/ClickStack#3761 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
fix(auth): add the email OTP verification step to Pollar loginCó thể đã có người làm @akansnoro đã nhận hôm nay. Đang mởStellar Wave
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
safetrustcr/dApp-SafeTrust#584 · 10 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày