Skip to content
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

Feature: Support helm --username --password #255

Open
Exchizz opened this issue Mar 6, 2023 · 6 comments
Open

Feature: Support helm --username --password #255

Exchizz opened this issue Mar 6, 2023 · 6 comments
Labels
enhancement New feature or request good first issue Good for newcomers hacktoberfest help wanted Extra attention is needed

Comments

@Exchizz
Copy link

Exchizz commented Mar 6, 2023

Hi,

I'm currently looking into using helm-git from ArgoCD. ArgoCD passes credentials to helm repositories using "helm repo add --username and --password). Currently helm-git does not support using credentials passed via helm repo add --username and --password

I think it would be possible to support using something like:

git -c credential.helper='!f() { sleep 1; echo "username=${GIT_USER}"; echo "password=${GIT_PASSWORD}"; }; f' pull

(Copied from https://stackoverflow.com/a/65705346/1493471)

If I managed to implement this in helm-git, would this be merged in ?

\Mathias

@aslafy-z
Copy link
Owner

aslafy-z commented Mar 6, 2023

Hello,

AFAIK, Helm does not forward these credentials to downloader plugins. If you find a way to do so, I'm pretty sure we can merge that to helm-git.

These bindings has to be made manually either in the URL like git+https://username:password@host/... (for HTTP/S endpoints) or using a credential helper as stated in https://github.com/aslafy-z/helm-git#note-on-git-authentication.

If you're using ArgoCD and reference this Helm chart within the Application CR, you don't need to use this plugin as you can directly reference Helm sources files and link credentials.

Let me know if you need additional details

@Exchizz
Copy link
Author

Exchizz commented Mar 6, 2023

Hi,
I've created a PR that implements support for helm to pass --username and --password to download plugins.
helm/helm#11878

If it gets merged in I will make a pull request to helm-git that supports either git credentials helper or your approach with username:password :)

Thanks.

@vl-kp
Copy link

vl-kp commented Jun 1, 2023

but argocd only support http, i would like to use git+ssh

@aslafy-z
Copy link
Owner

aslafy-z commented Jun 1, 2023

@vl-kp I'm pretty sure ArgoCD supports working with Git over SSH

@vl-kp
Copy link

vl-kp commented Jun 6, 2023

I want the valueFiles to support git over ssh, currently only http+https, i made it works after add id_rsa, but it doesn't full support my initial goal, anyway thanks for the answer

And i found helm-git doesn't support .. in the path, not sure if this should be supported

@aslafy-z
Copy link
Owner

aslafy-z commented Jun 6, 2024

@Exchizz I've seen helm/helm#11878 was merged. I'd be welcomed to review a PR that implements support for it in helm-git 👍

@aslafy-z aslafy-z added enhancement New feature or request help wanted Extra attention is needed good first issue Good for newcomers labels Sep 4, 2024
@aslafy-z aslafy-z changed the title Feature: Use parameters passed from argo repo add --username --password Feature: Support helm --username --password Sep 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers hacktoberfest help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants