What is the "Proper" Way to Compile or Install Something from Github and Make it Accessible in a Template?

You can configure the script to use proxy:

You can set this proxy for any app that is used in setup process git/curl/wget/etc.