forked from cloudfoundry/docs-cf-cli
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathhttp-proxy.html.md.erb
More file actions
74 lines (48 loc) · 2.32 KB
/
Copy pathhttp-proxy.html.md.erb
File metadata and controls
74 lines (48 loc) · 2.32 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
---
title: Using the cf CLI with an HTTP Proxy Server
owner: CLI
---
<strong><%= modified_date %></strong>
If you have an HTTP proxy server on your network between a host running the cf CLI and your Cloud Foundry API endpoint, you must set `https_proxy` with the hostname or IP address of the proxy server.
The `https_proxy` environment variable holds the hostname or IP address of your
proxy server.
`https_proxy` is a standard environment variable.
Like any environment variable, the specific steps you use to set it depends on
your operating system.
## <a id="format"></a>Format of https_proxy ##
`https_proxy` is set with hostname or IP address of the proxy server in URL
format: `https_proxy=http://proxy.example.com`
If the proxy server requires a user name and password, include the credentials:
`https_proxy=http://username:password@proxy.example.com`
If the proxy server uses a port other than 80, include the port number:
`https_proxy=http://username:password@proxy.example.com:8080`
## <a id="mac-linux"></a>Setting https_proxy in Mac OS or Linux ##
Set the `https_proxy` environment variable using the command specific to your
shell.
For example, in bash, use the `export` command.
Example:
<pre class=terminal>
$ export https_proxy=http:/<span>/</span>my.proxyserver.com:8080
</pre>
To make this change persistent, add the command to the appropriate profile file
for the shell.
For example, in bash, add a line like the following to your `.bash_profile` or
`.bashrc` file:
<pre class="detect-script"t>
https_proxy=http://username:password@hostname:port
export $https_proxy
</pre>
## <a id="windows"></a>Setting https_proxy in Windows ##
1. Open the Start menu. Right-click **Computer** and select **Properties**.
<%= image_tag("./images/properties.png") %>
1. In the left pane of the System window, click **Advanced system settings**.
<%= image_tag("./images/adv-settings.png") %>
1. In the System Properties window, select the **Advanced** tab, then click
**Environment Variables**.
<%= image_tag("./images/env-var.png") %>
1. In the Environment Variables window, under User variables, click **New**.
<%= image_tag("./images/new.png") %>
1. In the Variable name field, input `https_proxy`.
In the Variable value field, input your proxy server information.
<%= image_tag("./images/proxy.png") %>
1. Click **OK**.