-
Notifications
You must be signed in to change notification settings - Fork 368
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docs: Document proxy environment variable usage. #733
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks for the contribution. some suggestions.
@@ -43,4 +43,15 @@ variable in your `~/.bashrc`, `~/.bash_profile`, or `~/.zshrc`: | |||
export KREW_DEFAULT_INDEX_URI='[email protected]:foo/custom-index.git' | |||
``` | |||
|
|||
## Configure network proxy {#custom-network-proxy} | |||
|
|||
If you want to use Krew with a http proxy, you may need to configure environment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
a → an
http → HTTP
## Configure network proxy {#custom-network-proxy} | ||
|
||
If you want to use Krew with a http proxy, you may need to configure environment | ||
variables to support http_proxy, https_proxy, or no_proxy: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
change
,you may need to configure environment variables to support http_proxy, https_proxy, or no_proxy
to
, you can configure environment variables
HTTP_PROXY
,HTTPS_PROXY
, andNO_PROXY
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you can also add:
Behavior of these environment variables are explained here.
export HTTP_PROXY="http://proxy-ip:port/" | ||
export HTTPS_PROXY="http://proxy-ip:port/" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think http://
prefix is required for these values (although it might still work)
```shell | ||
export HTTP_PROXY="http://proxy-ip:port/" | ||
export HTTPS_PROXY="http://proxy-ip:port/" | ||
export NO_PROXY="ip,ip,ip,ip,.example.com" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
a better example can be:
export NO_PROXY="ip1,ip2:port2,.example.com"
Thank you for sharing your advice with me. |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: ahmetb, zhengtianbao The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
When in enterprise network, Krew may need a proxy setting to access public network fetch plugins. Krew
DefaultClient
setDefaultTransport
which setProxyFromEnvironment
when it's nil, thus Krew will pick theseHTTP_PROXY
,HTTPS_PROXY
environment vars up by default, I guess we can update the document for more details.Related issue: #685