Kong-lapis luarock fails


One of the dependencies for kong is the kong-lapis luarock. Unfortuntely, this dependency is resolved using the ‘git’ protocol (9418/tcp). For those working behind restrictive corporate firewalls, this breaks the ability to build Kong without creating creative work-arounds.



You can get around this by adjusting your git config as follows:

git config --global url.https://github.com/.insteadOf git://github.com/



Great idea. I had no idea that was a feature. However, homebrew seems to override the global settings. Instead, I set that configuration item at the system level and homebrew picked it up.



some problem here, can you explain in more detail the solution?



My company has a restrictive firewall that prevents connections via port 22/tcp (SSH) and port 9418/tcp (read-only git). The only option we have open is HTTP/HTTPS.

The solution is a git feature which allows you to specify a replacement URL for a given URL. So, when git tries to clone from “git://github.com/”, this rule in the configuration says to use “https://github.com/” instead.

For me, though, I was trying to use Homebrew and not just git by itself. Homebrew uses Git under the covers and overrides the settings found in the Git configuration at the “global” level. The system level configuration items are normally not used, but in my case, allowed me to set the URL override so that it applied to homebrew in additional to regular Git.