helm-push icon indicating copy to clipboard operation
helm-push copied to clipboard

HELM_REPO_ACCESS_TOKEN overrides ~/.cfconfig

Open dustinvanbuskirk opened this issue 5 years ago • 1 comments

The documentation is incorrect.

Setting HELM_REPO_ACCESS_TOKEN in your environment will not be overridden when a ~/.cfconfig is in place.

https://github.com/chartmuseum/helm-push/blob/master/README.md#token-config-file-cfconfig

If detected, this API key will be used for token-based auth, overriding basic auth options described above

dustinvanbuskirk avatar Jan 30 '19 21:01 dustinvanbuskirk

Although I agree the documentation might not be perfectly clear, I think what it's trying to say is ~/.cfconfig will override basic auth (as in HELM_REPO_USERNAME and HELM_REPO_PASSWORD).

If you take a look at the token documentation, it also says:

This will result in all basic auth options above being ignored, and the plugin will send the token in the header:

So I don't think the documentation is wrong here, nothing says that a token from the HELM_REPO_ACCESS_TOKEN env var will be overridden.

IMHO that's perfectly fine, environment variables usually have a higher precedence than config files.

sagikazarmark avatar Sep 01 '20 15:09 sagikazarmark