Unify proxy documentation.
Specify under the list of environment variables how to set each of those that we passthrough and use.
This commit is contained in:
		
							parent
							
								
									3f7e63a24c
								
							
						
					
					
						commit
						022303f96c
					
				@ -235,20 +235,26 @@ can take several different forms:
 | 
				
			|||||||
  * `HOMEBREW_VERBOSE`:
 | 
					  * `HOMEBREW_VERBOSE`:
 | 
				
			||||||
    If set, Homebrew always assumes `--verbose` when running commands.
 | 
					    If set, Homebrew always assumes `--verbose` when running commands.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  * `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.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  * `ftp_proxy`:
 | 
				
			||||||
 | 
					    Sets the FTP proxy to be used by `curl`, `git` and `svn` when downloading
 | 
				
			||||||
 | 
					    through Homebrew.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
## USING HOMEBREW BEHIND A PROXY
 | 
					## USING HOMEBREW BEHIND A PROXY
 | 
				
			||||||
 | 
					Use the `http_proxy`, `https_proxy` and/or `ftp_proxy` documented above. For example for an unauthenticated HTTP proxy:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
Homebrew uses several commands for downloading files (e.g. `curl`, `git`, `svn`).
 | 
					    export http_proxy=http://<host>:<port>
 | 
				
			||||||
Many of these tools can download via a proxy. It's common for these tools
 | 
					 | 
				
			||||||
to read proxy parameters from environment variables.
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
For the majority of cases setting `http_proxy` is enough. You can set this in
 | 
					And for an authenticated HTTP proxy:
 | 
				
			||||||
your shell profile, or you can use it before a brew command:
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
    http_proxy=http://<host>:<port> brew install foo
 | 
					    export http_proxy=http://<user>:<password>@<host>:<port>
 | 
				
			||||||
 | 
					 | 
				
			||||||
If your proxy requires authentication:
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    http_proxy=http://<user>:<password>@<host>:<port> brew install foo
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
## SEE ALSO
 | 
					## SEE ALSO
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -1077,20 +1077,26 @@ can take several different forms:
 | 
				
			|||||||
  * `HOMEBREW_VERBOSE`:
 | 
					  * `HOMEBREW_VERBOSE`:
 | 
				
			||||||
    If set, Homebrew always assumes `--verbose` when running commands.
 | 
					    If set, Homebrew always assumes `--verbose` when running commands.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  * `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.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  * `ftp_proxy`:
 | 
				
			||||||
 | 
					    Sets the FTP proxy to be used by `curl`, `git` and `svn` when downloading
 | 
				
			||||||
 | 
					    through Homebrew.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
## USING HOMEBREW BEHIND A PROXY
 | 
					## USING HOMEBREW BEHIND A PROXY
 | 
				
			||||||
 | 
					Use the `http_proxy`, `https_proxy` and/or `ftp_proxy` documented above. For example for an unauthenticated HTTP proxy:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
Homebrew uses several commands for downloading files (e.g. `curl`, `git`, `svn`).
 | 
					    export http_proxy=http://`host`:`port`
 | 
				
			||||||
Many of these tools can download via a proxy. It's common for these tools
 | 
					 | 
				
			||||||
to read proxy parameters from environment variables.
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
For the majority of cases setting `http_proxy` is enough. You can set this in
 | 
					And for an authenticated HTTP proxy:
 | 
				
			||||||
your shell profile, or you can use it before a brew command:
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
    http_proxy=http://`host`:`port` brew install foo
 | 
					    export http_proxy=http://`user`:`password`@`host`:`port`
 | 
				
			||||||
 | 
					 | 
				
			||||||
If your proxy requires authentication:
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    http_proxy=http://`user`:`password`@`host`:`port` brew install foo
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
## SEE ALSO
 | 
					## SEE ALSO
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -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.
 | 
					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
 | 
					## Installing stuff without the Xcode CLT
 | 
				
			||||||
 | 
					
 | 
				
			||||||
```sh
 | 
					```sh
 | 
				
			||||||
 | 
				
			|||||||
@ -1104,30 +1104,39 @@ This issue typically occurs when using FileVault or custom SSD configurations\.
 | 
				
			|||||||
\fBHOMEBREW_VERBOSE\fR
 | 
					\fBHOMEBREW_VERBOSE\fR
 | 
				
			||||||
If set, Homebrew always assumes \fB\-\-verbose\fR when running commands\.
 | 
					If set, Homebrew always assumes \fB\-\-verbose\fR when running commands\.
 | 
				
			||||||
.
 | 
					.
 | 
				
			||||||
.SH "USING HOMEBREW BEHIND A PROXY"
 | 
					.TP
 | 
				
			||||||
Homebrew uses several commands for downloading files (e\.g\. \fBcurl\fR, \fBgit\fR, \fBsvn\fR)\. Many of these tools can download via a proxy\. It\'s common for these tools to read proxy parameters from environment variables\.
 | 
					\fBhttp_proxy\fR
 | 
				
			||||||
 | 
					Sets the HTTP proxy to be used by \fBcurl\fR, \fBgit\fR and \fBsvn\fR when downloading through Homebrew\.
 | 
				
			||||||
.
 | 
					.
 | 
				
			||||||
.P
 | 
					.TP
 | 
				
			||||||
For the majority of cases setting \fBhttp_proxy\fR is enough\. You can set this in your shell profile, or you can use it before a brew command:
 | 
					\fBhttps_proxy\fR
 | 
				
			||||||
 | 
					Sets the HTTPS proxy to be used by \fBcurl\fR, \fBgit\fR and \fBsvn\fR when downloading through Homebrew\.
 | 
				
			||||||
 | 
					.
 | 
				
			||||||
 | 
					.TP
 | 
				
			||||||
 | 
					\fBftp_proxy\fR
 | 
				
			||||||
 | 
					Sets the FTP proxy to be used by \fBcurl\fR, \fBgit\fR and \fBsvn\fR when downloading through Homebrew\.
 | 
				
			||||||
 | 
					.
 | 
				
			||||||
 | 
					.SH "USING HOMEBREW BEHIND A PROXY"
 | 
				
			||||||
 | 
					Use the \fBhttp_proxy\fR, \fBhttps_proxy\fR and/or \fBftp_proxy\fR documented above\. For example for an unauthenticated HTTP proxy:
 | 
				
			||||||
.
 | 
					.
 | 
				
			||||||
.IP "" 4
 | 
					.IP "" 4
 | 
				
			||||||
.
 | 
					.
 | 
				
			||||||
.nf
 | 
					.nf
 | 
				
			||||||
 | 
					
 | 
				
			||||||
http_proxy=http://<host>:<port> brew install foo
 | 
					export http_proxy=http://<host>:<port>
 | 
				
			||||||
.
 | 
					.
 | 
				
			||||||
.fi
 | 
					.fi
 | 
				
			||||||
.
 | 
					.
 | 
				
			||||||
.IP "" 0
 | 
					.IP "" 0
 | 
				
			||||||
.
 | 
					.
 | 
				
			||||||
.P
 | 
					.P
 | 
				
			||||||
If your proxy requires authentication:
 | 
					And for an authenticated HTTP proxy:
 | 
				
			||||||
.
 | 
					.
 | 
				
			||||||
.IP "" 4
 | 
					.IP "" 4
 | 
				
			||||||
.
 | 
					.
 | 
				
			||||||
.nf
 | 
					.nf
 | 
				
			||||||
 | 
					
 | 
				
			||||||
http_proxy=http://<user>:<password>@<host>:<port> brew install foo
 | 
					export http_proxy=http://<user>:<password>@<host>:<port>
 | 
				
			||||||
.
 | 
					.
 | 
				
			||||||
.fi
 | 
					.fi
 | 
				
			||||||
.
 | 
					.
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user