DataGrip Postgres SSL错误:sun.security.validator.ValidatorException

Pet*_*ron 8 postgresql ssl datagrip

DataGrip不会连接到我的Postgres实例,但我可以通过psql终端连接正常:

psql -h dbhost.com reps username
>Password for user... (connects)
Run Code Online (Sandbox Code Playgroud)

但是,IntelliJ DataGrip抛出:

Connection to username@dbhost.com failed.
SSL error: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
Run Code Online (Sandbox Code Playgroud)

它使用的连接字符串是 jdbc:postgresql://dbhost.com:5432/dbname

Lia*_*ark 19

尝试在数据库属性窗口的SSH/SSL选项卡中禁用SSL复选框.

然后附加?sslmode=require到"常规"选项卡中的URL,使其显示如下内容: jdbc:postgresql://localhost:5432/reps?sslmode=require