diff options
| author | Mike McQuaid | 2017-11-30 14:05:06 +0000 | 
|---|---|---|
| committer | Mike McQuaid | 2017-11-30 14:05:06 +0000 | 
| commit | 022303f96c6226001308b994ad68b460f5df579b (patch) | |
| tree | 818f329e4cfcfe55af54be2147ac9c75d0f9e029 /docs | |
| parent | 3f7e63a24c7a449eeed3d5dcee1f209b924d58cb (diff) | |
| download | brew-022303f96c6226001308b994ad68b460f5df579b.tar.bz2 | |
Unify proxy documentation.
Specify under the list of environment variables how to set each of those
that we passthrough and use.
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/Manpage.md | 24 | ||||
| -rw-r--r-- | docs/Tips-N'-Tricks.md | 17 | 
2 files changed, 15 insertions, 26 deletions
diff --git a/docs/Manpage.md b/docs/Manpage.md index d94cec30a..fc0bb0465 100644 --- a/docs/Manpage.md +++ b/docs/Manpage.md @@ -1077,20 +1077,26 @@ can take several different forms:    * `HOMEBREW_VERBOSE`:      If set, Homebrew always assumes `--verbose` when running commands. -## USING HOMEBREW BEHIND A PROXY +  * `http_proxy`: +    Sets the HTTP proxy to be used by `curl`, `git` and `svn` when downloading +    through Homebrew. + +  * `https_proxy`: +    Sets the HTTPS proxy to be used by `curl`, `git` and `svn` when downloading +    through Homebrew. -Homebrew uses several commands for downloading files (e.g. `curl`, `git`, `svn`). -Many of these tools can download via a proxy. It's common for these tools -to read proxy parameters from environment variables. +  * `ftp_proxy`: +    Sets the FTP proxy to be used by `curl`, `git` and `svn` when downloading +    through Homebrew. -For the majority of cases setting `http_proxy` is enough. You can set this in -your shell profile, or you can use it before a brew command: +## USING HOMEBREW BEHIND A PROXY +Use the `http_proxy`, `https_proxy` and/or `ftp_proxy` documented above. For example for an unauthenticated HTTP proxy: -    http_proxy=http://`host`:`port` brew install foo +    export http_proxy=http://`host`:`port` -If your proxy requires authentication: +And for an authenticated HTTP proxy: -    http_proxy=http://`user`:`password`@`host`:`port` brew install foo +    export http_proxy=http://`user`:`password`@`host`:`port`  ## SEE ALSO diff --git a/docs/Tips-N'-Tricks.md b/docs/Tips-N'-Tricks.md index ab72f541e..a88940f0e 100644 --- a/docs/Tips-N'-Tricks.md +++ b/docs/Tips-N'-Tricks.md @@ -55,23 +55,6 @@ run `mv the_tarball $(brew --cache -s <formula>)`.  You can also pre-cache the download by using the command `brew fetch formula` which also displays the SHA-256 hash. This can be useful for updating formulae to new versions. -## Using Homebrew behind a proxy -Behind the scenes, Homebrew uses several commands for downloading files (e.g. `curl`, `git`, `svn`).  Many of these tools can download via a proxy.  It's a common (though not universal) convention for these command-line tools to observe getting the proxy parameters from environment variables (e.g. `http_proxy`).  Unfortunately, most tools are inconsistent in their use of these environment parameters (e.g. `curl` supports `http_proxy`, `HTTPS_PROXY`, `FTP_PROXY`, `GOPHER_PROXY`, `ALL_PROXY`, `NO_PROXY`). - -Luckily, for the majority of cases setting `http_proxy` is enough. -You can set this environment variable in several ways (search on the -internet for details), including at runtime: - -```sh -http_proxy=http://<proxyhost>:<proxyport> brew install <formula> -``` - -To use proxy authentication: - -```sh -http_proxy=http://<user>:<password>@<proxyhost>:<proxyport>  brew install <formula> -``` -  ## Installing stuff without the Xcode CLT  ```sh  | 
