الحصول على OpenSSL::SSL::SSLError من discourse_theme CLI

أقوم بتشغيل موقع Discourse بنجاح محليًا باستخدام OrbStack كبديل لـ Docker Desktop. يوفر اسم مضيف مخصصًا ويقدم الحاوية بشهادة SSL، وبدون إضافة منفذ 4200. على سبيل المثال، https://discourse.orb.local

ومع ذلك، عندما أرغب في استخدام تطبيق سطر الأوامر discourse_theme للتطوير المحلي، أحصل على خطأ يشكو من اتصال SSL: certificate verify failed

SSL_connect returned=1 errno=0 peeraddr=198.19.248.3:443 state=error: certificate verify failed (self-signed certificate in certificate chain) (OpenSSL::SSL::SSLError)

discourse_theme watch .
$ discourse_theme watch .

» Using https://discourse.orb.local from /Users/user123/.discourse_theme
» Using api key from /Users/user123/.discourse_theme
/opt/homebrew/lib/ruby/gems/3.3.0/gems/net-protocol-0.2.2/lib/net/protocol.rb:46:in `connect_nonblock': SSL_connect returned=1 errno=0 peeraddr=198.19.248.3:443 state=error: certificate verify failed (self-signed certificate in certificate chain) (OpenSSL::SSL::SSLError)
        from /opt/homebrew/lib/ruby/gems/3.3.0/gems/net-protocol-0.2.2/lib/net/protocol.rb:46:in `ssl_socket_connect'
        from /opt/homebrew/lib/ruby/gems/3.3.0/gems/net-http-0.6.0/lib/net/http.rb:1742:in `connect'
        from /opt/homebrew/lib/ruby/gems/3.3.0/gems/net-http-0.6.0/lib/net/http.rb:1642:in `do_start'
        from /opt/homebrew/lib/ruby/gems/3.3.0/gems/net-http-0.6.0/lib/net/http.rb:1631:in `start'
        from /opt/homebrew/lib/ruby/gems/3.3.0/gems/net-http-0.6.0/lib/net/http.rb:2375:in `request'
        from /opt/homebrew/lib/ruby/gems/3.3.0/gems/discourse_theme-2.1.6/lib/discourse_theme/client.rb:144:in `request'
        from /opt/homebrew/lib/ruby/gems/3.3.0/gems/discourse_theme-2.1.6/lib/discourse_theme/client.rb:112:in `discourse_version'
        from /opt/homebrew/lib/ruby/gems/3.3.0/gems/discourse_theme-2.1.6/lib/discourse_theme/client.rb:19:in `initialize'
        from /opt/homebrew/lib/ruby/gems/3.3.0/gems/discourse_theme-2.1.6/lib/discourse_theme/cli.rb:72:in `new'
        from /opt/homebrew/lib/ruby/gems/3.3.0/gems/discourse_theme-2.1.6/lib/discourse_theme/cli.rb:72:in `run'
        from /opt/homebrew/lib/ruby/gems/3.3.0/gems/discourse_theme-2.1.6/bin/discourse_theme:6:in `<top (required)>'
        from /opt/homebrew/lib/ruby/gems/3.3.0/bin/discourse_theme:25:in `load'
        from /opt/homebrew/lib/ruby/gems/3.3.0/bin/discourse_theme:25:in `<main>'

لدي أحدث إصدارات من discourse_theme و OrbStack و openssl و ca-certificates.

عندما أستخدم Curl، أحصل على تأكيد لشهادة صالحة أيضًا:

curl -Iv https://discourse.orb.local
curl -Iv https://discourse.orb.local
* Host discourse.orb.local:443 was resolved.
* IPv6: (none)
* IPv4: 198.19.248.3
*   Trying 198.19.248.3:443...
* Connected to discourse.orb.local (198.19.248.3) port 443
* ALPN: curl offers h2,http/1.1
* (304) (OUT), TLS handshake, Client hello (1):
*  CAfile: /etc/ssl/cert.pem
*  CApath: none
* (304) (IN), TLS handshake, Server hello (2):
* (304) (IN), TLS handshake, Unknown (8):
* (304) (IN), TLS handshake, Certificate (11):
* (304) (IN), TLS handshake, CERT verify (15):
* (304) (IN), TLS handshake, Finished (20):
* (304) (OUT), TLS handshake, Finished (20):
* SSL connection using TLSv1.3 / AEAD-CHACHA20-POLY1305-SHA256 / [blank] / UNDEF
* ALPN: server accepted h2
* Server certificate:
*  subject: O=OrbStack Development; OU=Containers & Services; CN=discourse.orb.local
*  start date: Aug 25 08:07:50 2025 GMT
*  expire date: Nov 25 09:07:50 2027 GMT
*  subjectAltName: host "discourse.orb.local" matched cert's "discourse.orb.local"
*  issuer: O=OrbStack Development; OU=Containers & Services; CN=OrbStack Development Root CA
*  SSL certificate verify ok.
* using HTTP/2
* [HTTP/2] [1] OPENED stream for https://discourse.orb.local/
* [HTTP/2] [1] [:method: HEAD]
* [HTTP/2] [1] [:scheme: https]
* [HTTP/2] [1] [:authority: discourse.orb.local]
* [HTTP/2] [1] [:path: /]
* [HTTP/2] [1] [user-agent: curl/8.7.1]
* [HTTP/2] [1] [accept: */*]

> HEAD / HTTP/2
> Host: discourse.orb.local
> User-Agent: curl/8.7.1
> Accept: */*
> 
* Request completely sent off
< HTTP/2 200

ما الذي يسبب هذه المشكلة بالفعل؟ أي أفكار؟

لقد نقلت هذا الموضوع إلى Dev لأنه يتعلق باستخدام Discourse محليًا، كبيئة تطوير. إذا كنت بحاجة إلى إجابة في الوقت المناسب، فلا تتردد في التواصل مع team@discourse.org، كعميل مستضاف.

إعجاب واحد (1)