Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

g8 foundweekends/giter8.g8 gets access_denied #440

Closed
ckmcd opened this issue Nov 21, 2019 · 7 comments · Fixed by #441
Closed

g8 foundweekends/giter8.g8 gets access_denied #440

ckmcd opened this issue Nov 21, 2019 · 7 comments · Fixed by #441

Comments

@ckmcd
Copy link

ckmcd commented Nov 21, 2019

steps

$ g8 --version
g8 0.11.0
$ g8 foundweekends/giter8.g8

problem

SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/usr/local/Cellar/giter8/0.11.0/libexec/conscript/boot/scala-2.10.7/org.foundweekends.giter8/giter8/0.11.0/slf4j-log4j12-1.7.2.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/usr/local/Cellar/giter8/0.11.0/libexec/conscript/boot/scala-2.10.7/org.foundweekends.giter8/giter8/0.11.0/logback-classic-1.2.3.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [org.slf4j.impl.Log4jLoggerFactory]


Unknown exception: Received fatal alert: access_denied
<details>

It doesn't seem to be problem accessing GitHub because I observer the same behavior running against a local clone.

$ g8 file://giter8.g8
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/usr/local/Cellar/giter8/0.11.0/libexec/conscript/boot/scala-2.10.7/org.foundweekends.giter8/giter8/0.11.0/slf4j-log4j12-1.7.2.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/usr/local/Cellar/giter8/0.11.0/libexec/conscript/boot/scala-2.10.7/org.foundweekends.giter8/giter8/0.11.0/logback-classic-1.2.3.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [org.slf4j.impl.Log4jLoggerFactory]

Unknown exception: Received fatal alert: access_denied

And the same problem when using sbt...

$ sbt sbtVersion
[warn] No sbt.version set in project/build.properties, base directory: /Users/mcdermoc/localgit/harmony
[info] Loading settings for project global-plugins from plugins.sbt ...
[info] Loading global plugins from /Users/mcdermoc/.sbt/1.0/plugins
[info] Set current project to harmony (in build file:/Users/mcdermoc/localgit/harmony/)
[info] 1.2.6

$ sbt --debug new foundweekends/giter8.g8
[debug] Full compilation, no sources in previous analysis.
[debug] Copy resource mappings:
[debug]
[debug] Other repositories:
[debug] Default repositories:
[debug] Using inline dependencies specified in Scala.

Unknown exception: Received fatal alert: access_denied

expectation

Template is applied with no errors.

notes

@ckmcd
Copy link
Author

ckmcd commented Nov 21, 2019

Turns out this yet another corporate web proxy issue. When I get out from behind the proxy it works fine.

Behind the proxy it fails despite having

JAVA_OPTS=-Dhttp.proxySet=true -Dhttp.proxyHost=proxy.example.com -Dhttp.proxyPort=8080 -Dhttps.proxyHost=proxy.example.com -Dhttps.proxyPort=8080`

where proxy.example.com is my real corporate proxy host. Note that sbt resolution of remote repos works fine.

I'm OK closing this or I could try to help triangulate the problem if you like.

@ckmcd
Copy link
Author

ckmcd commented Nov 21, 2019

Actually this is a real pain as the maven properties don't work in my own templates.

@eed3si9n
Copy link
Member

Thanks for the report. It's not clear from the log if the problem is coming from git clone part or somewhere else. Are you using Maven properties in your template? If so would the problem go away if you removed it?

@eed3si9n
Copy link
Member

@ckmcd
Copy link
Author

ckmcd commented Nov 26, 2019

Hi, eed3si9n. Thanks for getting back to me.

Here is what I know.

  1. foundweekends/giter8.g8 exhibits the problem and that uses maven properties.
  2. any of my templates using maven properties exhibit the problem.

Seems like MavenHelper is the likely suspect.

After playing with giter8 for a while, I think can live without maven properties behind the firewall.
Even, with this flaw, its a cool tool Thanks!

eed3si9n added a commit to eed3si9n/giter8 that referenced this issue Nov 26, 2019
Fixes foundweekends#440

Apparently Apache HTTP client's DefaultHttpClient is having issue behind the firewall. This attempts to fix it by switching to URL#openConnection.
@eed3si9n
Copy link
Member

Here's my attempt at fixing this. I am hoping that built-in URL#openConnection would be better at handling proxies - #441

@ckmcd
Copy link
Author

ckmcd commented Nov 27, 2019

@eed3si9n, there are a bunch of unfortunate ones like me, for whom proxies are a thing, and on behalf of all of us, we thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging a pull request may close this issue.

2 participants