Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Grails create-app unable to find valid certification path to requested target

Tags:

grails

I have setup grails 3.2.1. on windows JAVA_HOME and GRAILS_HOME is also set. verified by running grails -version and worked as expected.

But when issue command to create app, it always throw following error

"Error occurred running Grails CLI: unable to find valid certification path to requested target (Use --stacktrace to see the full trace)".

I tried it by disconnecting the internet and come to know its trying to connect to https://repo.grails.org

It seems that some certificates must be in JAVA_HOME/jre/lib/security/cacerts. with this thought I downloaded the SSL certificates from https://repo.grails.org by accessing the URL in browser.

same certificates imported in the JAVA_HOME/jre/lib/security/cacerts but still no change.

I could not find even a single related post over the internet.

when creating Grails app in Netbeans 8, I get the same error.

I don't know if I need any other valid certificate or there is any other problem.

Many thanks in advance for any help on this.

like image 784
Abdul Khalik Avatar asked Oct 27 '25 10:10

Abdul Khalik


1 Answers

Use the "HTTP version" repository

Add the following configuration in USER_HOME/.grails/settings.groovy:

grails {
    profiles {
        repositories {
            myRepo {
               url = "http://repo.grails.org/grails/core/"
            }
        }
    }
}
like image 59
pinei Avatar answered Oct 30 '25 13:10

pinei



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!