Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

grails 3.0.1 proxy settings

Tags:

proxy

grails

I am new to Grails 3.0.1 and wonder how and where to set the correct Proxy settings. I know what my proxy configuration is - IP and port, but don't know where to place. I am getting errors like these when trying to run grails command within my helloworld project:

ivo@ivotrisquel:~/grails/projects/helloworld$ grails --stacktrace
| Error Problem updating profiles from origin git repository (NOTE: Stack trace has been filtered. Use --verbose to see entire trace.)
org.eclipse.jgit.api.errors.TransportException: https://github.com/grails/grails-profile-repository: cannot open git-upload-pack
    at org.eclipse.jgit.api.FetchCommand.call(FetchCommand.java:139)
    at org.grails.cli.profile.git.GitProfileRepository.fetchAndRebaseIfExpired(GitProfileRepository.groovy:140)
    at org.grails.cli.profile.git.GitProfileRepository.createOrUpdateRepository(GitProfileRepository.groovy:109)
    at org.grails.cli.profile.git.GitProfileRepository.getProfile(GitProfileRepository.groovy:56)
    at org.grails.cli.GrailsCli.initializeProfile(GrailsCli.groovy:347)
    at org.grails.cli.GrailsCli.execute(GrailsCli.groovy:192)
    at org.grails.cli.GrailsCli.main(GrailsCli.groovy:99)
Caused by: org.eclipse.jgit.errors.TransportException: https://github.com/grails/grails-profile-repository: cannot open git-upload-pack
    at org.eclipse.jgit.transport.TransportHttp.connect(TransportHttp.java:524)
    at org.eclipse.jgit.transport.TransportHttp.openFetch(TransportHttp.java:309)
    at org.eclipse.jgit.transport.FetchProcess.executeImp(FetchProcess.java:136)
    at org.eclipse.jgit.transport.FetchProcess.execute(FetchProcess.java:122)
    at org.eclipse.jgit.transport.Transport.fetch(Transport.java:1115)
    at org.eclipse.jgit.api.FetchCommand.call(FetchCommand.java:130)
    ... 6 more
Caused by: java.net.ConnectException: Connection timed out github.com
    at org.eclipse.jgit.util.HttpSupport.response(HttpSupport.java:175)
    at org.eclipse.jgit.transport.TransportHttp.connect(TransportHttp.java:475)
    ... 11 more
| Error Problem updating profiles from origin git repository
like image 517
ivo Avatar asked Apr 20 '15 06:04

ivo


People also ask

How do I change my proxy settings in gradle?

Android plugin for Gradle HTTP proxy settings For application-specific HTTP proxy settings, set the proxy settings in the build. gradle file as required for each application module. For project-wide HTTP proxy settings, set the proxy settings in the gradle/gradle. properties file.

What is proxy problem?

Techwalla explains, ''Proxy errors signify that an Internet user is not allowed to visit a specific website or URL. This restriction is set by the Internet administrator of the organization or by the website/URL creator to protect private content, which is only meant to be viewed by specific people. ''


3 Answers

I adedd the following to my ~/.grails/ProxySettings.groovy file.

client=['http.proxyHost':'myproxy', 'http.proxyPort':'myport', 'http.proxyUser':'myusername', 'http.proxyPassword':'mypass', 'http.nonProxyHosts':'localhost']
currentProxy='client'
like image 167
Daniel Avatar answered Jan 03 '23 02:01

Daniel


I had the same problem and solved it adding the proxy configuration to the GRAILS_HOME/bin/grails.bat file in the following way:

>set GRAILS_OPTS=%GRAILS_OPTS% -Dhttp.proxyHost=myProxy -Dhttp.proxyPort=myPort -Dhttps.proxyHost=myProxy -Dhttps.proxyPort=myPort -Dhttp.proxyUser=bob -Dhttp.proxyPassword=theBuilder

I believe there must be another way to configure the proxy in Grails 3.0.x but I haven't found it so far.

Regards

like image 25
Juan López Avatar answered Jan 03 '23 02:01

Juan López


In linux adding the configuration

export GRAILS_OPTS="-Dhttp.proxyHost=myProxy -Dhttp.proxyPort=myPort -Dhttps.proxyHost=myProxy -Dhttps.proxyPort=myPort"

in the GRAILS_HOME/bin/grails.sh file. Resolve my problem in Netbeans 8.1

like image 36
Ednilson Campos Avatar answered Jan 03 '23 02:01

Ednilson Campos