I was facing this and came across a solution on JetBrain’s community page.
To get rid of that, we need to make Idea Accept non-trusted certificates automatically.
Preferences -> Tools -> Server Certificates -> Check on "Accept non-trusted certificates automatically"
[EDIT]: This is not the best solution in terms of security.