Offline Homebrew installation


(Skriaudejas) #1

Hello All,

I am new to this forum, searched everywhere, but could not find any info on how to perform Homebrew offline installation.

The reason I need help on this, is because we use a proxy server which does not allow the usual install line (/usr/bin/ruby -e “$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)”) to be used.

I tried installing it on my personal Macbook, created a DMG file of the “Homebrew” folder that got created in /usr/local, but when I extract the DMG file and try to run any of the “brew” commands - they are not recognized.

Can some one help me to create a working Homebrew package that does not require the connection to “https://raw.githubusercontent.com/Homebrew/install/master/install”?


(Rainer M Krug) #2

If you click on that link it will open in your browser. You should be able to save the script and run it. If the rest is working through your proxy, I definitely can’t tell.

Cheers,

Rainer


(Skriaudejas) #3

Thanks for the tip, but I still see multiple “https://github.com/…” address lines in this install script, in certain cases it would try to connect to that address and would fail to do so.

What I am looking for is somehow “register” the Homebrew using files that are copy-pasted, so that “brew” commands would be recognized in terminal.


(Rainer M Krug) #4

Homebrew is a package manager and it needs to access the internet for downloading the programs to install. If you don’t manage to access GitHub via these links, I don’t think you will be able to run homebrew to install things.

Cheers,

Rainer


(Skriaudejas) #5

We are planning to get a list of most common apps from our users and pre-download them, put in “/usr/local/Cellar/” ant hopefully be able to use them.

I would still like to get back to my main question: is it possible to perform offline homebrew installation?


(Mike McQuaid) #6

No, it isn’t really. If your users aren’t going to be able to install applications it doesn’t seem Homebrew is very useful to them. Instead consider distributing your applications to users another way.


(Skriaudejas) #7

Thanks for the straight forward reply Mike. If we were to make a proxy exception, to be able to use Homebrew, what URL should be added to have fully working Homebrew?


(Mike McQuaid) #8

You can’t whitelist a single URL to have Homebrew work. github.com and homebrew.bintray.com will get you some but for Homebrew to be fully working you need to whitelist pretty much the public internet.


(Skriaudejas) #9

We have set up artifactory that bypasses proxy using command:

export HOMEBREW_BOTTLE_DOMAIN=“http://artifactory…”

This allows us to use Homebrew normally with proxy inplace. There is one limitation that the artifactory does not allow github com access, but it does allow homebrew bintray com.

However we are still having the same issue with Homebrew installation. If we could get it installed without having to access github.com somehow - we would be able to use it. Could some one help me create an offline installer?