add optional netrc authentication support for plugin downloads#897
Conversation
|
Welcome @dkulchinsky! |
030516a to
3fa9ba1
Compare
thank you @ahmetb for the review, I believe I addressed all the comments, very helpful! let me know if you have any other concerns. |
|
/lgtm |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: ahmetb, dkulchinsky The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
wonderful news @ahmetb! thank you again for the review & approval 😄 not to sound pushy 😅 but any chance a release can be triggered to include this change? we can't wait to drop our private fork, haha |
|
@dkulchinsky I don't think you've sent a docs PR yet? |
@ahmetb not yet, was just looking for it. Looks like:
I'll get that PR ready 👍🏼 |
|
@ahmetb here's the docs PR: #899 I ended up adding it to https://github.com/kubernetes-sigs/krew/blob/master/site/content/docs/user-guide/using-custom-indexes.md as I felt it's more appropriate context-wise, but happy to revise or add more info if needed. |
|
Hey @ahmetb 👋🏼 With the docs changes now merged & live, I'm hoping a krew release can be triggered? 🙏🏼 |
|
I can help shortly. Have you had a chance to compile and test it locally by the way? |
@ahmetb sure did! works as designed :) |
This MR contains the following updates: | Package | Update | Change | |---|---|---| | [kubernetes-sigs/krew](https://github.com/kubernetes-sigs/krew) | minor | `v0.4.5` → `v0.5.0` | MR created with the help of [el-capitano/tools/renovate-bot](https://gitlab.com/el-capitano/tools/renovate-bot). **Proposed changes to behavior should be submitted there as MRs.** --- ### Release Notes <details> <summary>kubernetes-sigs/krew (kubernetes-sigs/krew)</summary> ### [`v0.5.0`](https://github.com/kubernetes-sigs/krew/releases/tag/v0.5.0) [Compare Source](kubernetes-sigs/krew@v0.4.5...v0.5.0) ## Installation To install this release, refer to the instructions at <https://github.com/kubernetes-sigs/krew/blob/v0.5.0/README.md>. ## Release Assets Artifacts for this release can be downloaded from the following links. It is recommended to follow [installation instructions](https://github.com/kubernetes-sigs/krew/blob/v0.5.0/README.md) and not using these artifacts directly. - <https://github.com/kubernetes-sigs/krew/releases/download/v0.5.0/krew-darwin_amd64.tar.gz> - <https://github.com/kubernetes-sigs/krew/releases/download/v0.5.0/krew-darwin_amd64.tar.gz.sha256> - <https://github.com/kubernetes-sigs/krew/releases/download/v0.5.0/krew-darwin_arm64.tar.gz> - <https://github.com/kubernetes-sigs/krew/releases/download/v0.5.0/krew-darwin_arm64.tar.gz.sha256> - <https://github.com/kubernetes-sigs/krew/releases/download/v0.5.0/krew-linux_amd64.tar.gz> - <https://github.com/kubernetes-sigs/krew/releases/download/v0.5.0/krew-linux_amd64.tar.gz.sha256> - <https://github.com/kubernetes-sigs/krew/releases/download/v0.5.0/krew-linux_arm.tar.gz> - <https://github.com/kubernetes-sigs/krew/releases/download/v0.5.0/krew-linux_arm.tar.gz.sha256> - <https://github.com/kubernetes-sigs/krew/releases/download/v0.5.0/krew-linux_arm64.tar.gz> - <https://github.com/kubernetes-sigs/krew/releases/download/v0.5.0/krew-linux_arm64.tar.gz.sha256> - <https://github.com/kubernetes-sigs/krew/releases/download/v0.5.0/krew-linux_ppc64le.tar.gz> - <https://github.com/kubernetes-sigs/krew/releases/download/v0.5.0/krew-linux_ppc64le.tar.gz.sha256> - <https://github.com/kubernetes-sigs/krew/releases/download/v0.5.0/krew-windows_amd64.tar.gz> - <https://github.com/kubernetes-sigs/krew/releases/download/v0.5.0/krew-windows_amd64.tar.gz.sha256> - <https://github.com/kubernetes-sigs/krew/releases/download/v0.5.0/krew.exe> - <https://github.com/kubernetes-sigs/krew/releases/download/v0.5.0/krew.exe.sha256> - <https://github.com/kubernetes-sigs/krew/releases/download/v0.5.0/krew.yaml> Thanks to our contributors for helping out with v0.5.0: - Tyler Auerbeck - Danny Kulchinsky - mattn - ls-2018 - Mikel Olasagasti Uranga - Ishaan Mittal - Ahmet Alp Balkan (krew v0.5.0 was tagged on Thu Feb 26 02:31:09 UTC 2026.) <details> <summary>Merged pull requests</summary> - add optional netrc authentication support for plugin downloads [#​897](kubernetes-sigs/krew#897) - docs for netrc auth [#​899](kubernetes-sigs/krew#899) - Update to Go 1.25 and latest Go dependencies [#​890](kubernetes-sigs/krew#890) - feat: speed up ci [#​884](kubernetes-sigs/krew#884) - Fix: Non-constant format string in PrintWarning [#​877](kubernetes-sigs/krew#877) - Bump GitHub actions to latest stable [#​881](kubernetes-sigs/krew#881) - bump golangci-lint to v2 [#​880](kubernetes-sigs/krew#880) - Add workaround for msys2/cygwin git [#​873](kubernetes-sigs/krew#873) </details> </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever MR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this MR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this MR, check this box --- This MR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My4zNS4xIiwidXBkYXRlZEluVmVyIjoiNDMuMzUuMSIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsiUmVub3ZhdGUgQm90IiwiYXV0b21hdGlvbjpib3QtYXV0aG9yZWQiLCJkZXBlbmRlbmN5LXR5cGU6Om1pbm9yIl19-->
Related issue: #896
This PR adds support for netrc authentication when downloading kubectl plugins, allowing users to access private plugin repositories that require HTTP Basic authentication.
Changes
New CLI flags:
--enable-netrc: Enable netrc authentication for downloads--netrc-file: Specify custom netrc file path (defaults to ~/.netrc)Implementation:
Usage
Example
.netrcentry:This enables krew to work with private plugin repositories while maintaining backward compatibility and security best practices.