If you open https://repo.cuba-platform.com/content/groups/work/com/haulmont/gradle/cuba-plugin/7.2.7/cuba-plugin-7.2.7.pom address in your browser - then the correct answer should be “http 401 unauthorized”, because this repository needs http authentication (user: cuba, password: cuba123).
E.g. see these declarations with password in build.gradle:
username(rootProject.hasProperty('repoUser') ? rootProject['repoUser'] : 'cuba')
password(rootProject.hasProperty('repoPass') ? rootProject['repoPass'] : 'cuba123')
If you get certificate exceptions - this means that something in your network (either a controlling software used by your company, or a malware) is trying to be “the man in the middle” in the SSL negotiation process.
You need to download the certificate, e.g. with web browser, review it and if it’s trusted - then add to the certificate store of your computer and probably, to certificate stores of JDK you use for developing the code and JRE used by the IntelliJ IDEA / CUBA Studio.