title: DataGrip Postgres SSL error: sun.security.validator.ValidatorException
body: <p>DataGrip won't connect to my Postgres instance, but I can connect fine via <code>psql</code> on the terminal:</p>
  
  <pre><code>psql -h dbhost.com reps username
  &gt;Password for user... (connects)
  </code></pre>
  
  <p>However, IntelliJ DataGrip throws:</p>
  
  <pre><code>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
  </code></pre>
  
  <p>The connection string it uses is <code>jdbc:postgresql://dbhost.com:5432/dbname</code></p>