From 8bd8ad89fd0801a780b5db5ab02db6fdf6ef4e86 Mon Sep 17 00:00:00 2001 From: zhengtianbao Date: Mon, 25 Oct 2021 11:00:40 +0800 Subject: [PATCH 1/2] docs: Document proxy environment variable usage. --- site/content/docs/user-guide/configuration.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/site/content/docs/user-guide/configuration.md b/site/content/docs/user-guide/configuration.md index 3d2a023b..8ee89ce4 100644 --- a/site/content/docs/user-guide/configuration.md +++ b/site/content/docs/user-guide/configuration.md @@ -43,4 +43,15 @@ variable in your `~/.bashrc`, `~/.bash_profile`, or `~/.zshrc`: export KREW_DEFAULT_INDEX_URI='git@github.com: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 +variables to support http_proxy, https_proxy, or no_proxy: + +```shell +export HTTP_PROXY="http://proxy-ip:port/" +export HTTPS_PROXY="http://proxy-ip:port/" +export NO_PROXY="ip,ip,ip,ip,.example.com" +``` + [ki]: https://github.com/kubernetes-sigs/krew-index From 2912ae5c4ce9371983b61a9f448997b6a67d389d Mon Sep 17 00:00:00 2001 From: zhengtianbao Date: Tue, 26 Oct 2021 08:30:34 +0800 Subject: [PATCH 2/2] fix typo in proxy setting doc --- site/content/docs/user-guide/configuration.md | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/site/content/docs/user-guide/configuration.md b/site/content/docs/user-guide/configuration.md index 8ee89ce4..81a7534d 100644 --- a/site/content/docs/user-guide/configuration.md +++ b/site/content/docs/user-guide/configuration.md @@ -45,13 +45,15 @@ export KREW_DEFAULT_INDEX_URI='git@github.com: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 -variables to support http_proxy, https_proxy, or no_proxy: +If you want to use Krew with an HTTP proxy, you can configure environment +variables HTTP_PROXY, HTTPS_PROXY and NO_PROXY. Behavior of these +environment variables are explained [here][httpproxy]. ```shell -export HTTP_PROXY="http://proxy-ip:port/" -export HTTPS_PROXY="http://proxy-ip:port/" -export NO_PROXY="ip,ip,ip,ip,.example.com" +export HTTP_PROXY="proxy-ip:port" +export HTTPS_PROXY="proxy-ip:port" +export NO_PROXY="ip1,ip2:port2,.example.com" ``` [ki]: https://github.com/kubernetes-sigs/krew-index +[httpproxy]: https://pkg.go.dev/golang.org/x/net/http/httpproxy#Config