Closed fuog closed 6 months ago
yes, i can reproduce it in public with latest helm-git:
❯ helm repo add test 'git+https://gitlab.com/fuog/helm-git-debugging.git@charts?ref=with'
fatal: update_ref failed for ref 'HEAD': cannot update ref 'refs/heads/master': trying to write non-commit object cfef023dc69a952e218e0c778ee353ef5f5aef56 to branch 'refs/heads/master'
Error in plugin 'helm-git': Unable to sparse-checkout. Check your Git ref (with) and path (charts).
Error: looks like "git+https://gitlab.com/fuog/helm-git-debugging.git@charts?ref=with" is not a valid chart repository or cannot be reached: plugin "helm-git" exited with error
❯ helm repo add test 'git+https://gitlab.com/fuog/helm-git-debugging.git@charts?ref=without'
"test" has been added to your repositories
you're welcome to see the structure and tags i created within the repository.
analysing the script with set -x
i see the fail ocure in the command git pull --quiet --depth 1 origin with
up to that point the both execution look exactly the same. so strange ...
Thank you for the report @fuog
Can you please try with the sparse=0
option?
Also, please define the HELM_GIT_DEBUG=1
env variable.
okay, very strange i honestly didn't expect the flag because i didn't think it would make a difference. So it works with the flag. Can you explain why exactly?
❯ HELM_GIT_DEBUG=1
❯ helm repo add test 'git+https://gitlab.com/fuog/helm-git-debugging.git@charts?ref=with'
fatal: update_ref failed for ref 'HEAD': cannot update ref 'refs/heads/master': trying to write non-commit object cfef023dc69a952e218e0c778ee353ef5f5aef56 to branch 'refs/heads/master'
Error in plugin 'helm-git': Unable to sparse-checkout. Check your Git ref (with) and path (charts).
Error: looks like "git+https://gitlab.com/fuog/helm-git-debugging.git@charts?ref=with" is not a valid chart repository or cannot be reached: plugin "helm-git" exited with error
❯ helm repo add test 'git+https://gitlab.com/fuog/helm-git-debugging.git@charts?ref=with&sparse=0'
"test" has been added to your repositories
The HELM_GIT_DEBUG=1
variable should be exported:
HELM_GIT_DEBUG=1 helm repo...
export HELM_GIT_DEBUG=1; helm repo...
Anyway, the issue was already reported at https://github.com/aslafy-z/helm-git/issues/9#issue-439409193
I had no time to work on the topic, however, I'd be happy to review pull requests.
Marking this issue as duplicate #9
@fuog can you please try again with helm plugin install https://github.com/aslafy-z/helm-git --version 5683385eae278be4709838fdc622513f5d97d947
? Thank you
Hello everyone, I have a strange bug that I noticed via helmfile, but it can be isolated to just this plugin. When I try to add a repository via release-tag, I get an error. After some trial and error, I realized that I can reliably reproduce the error if the release-tag has a message and if no message is set, then the pull works without any problems. helmfile itself works with an outdated version of helm-git. however, i was able to reproduce the problem in exactly the same way with the current version. I can't really understand why a tag message makes a difference, does anyone have an idea? Helm version:
helm-git
version: 0.12 - 0.15.1 Git version: gitlab v16.5.8-eeSteps To Reproduce
helm create some-chartname
within that folderRegarding messages: I have tried everything with the tag message, even a simple string like
foobar
causes the problem. Special characters can be excluded as the cause.How did i tries to pull?
The current behavior
in this case
0.15.1
The expected behavior
same behavior as when the tag hes no teg message
I'll see if the problem can also be reproduced with gitlab, the cloud service, and send you a command example that can be tested publicly.
Thank you very much for your help