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

Bug: /usr/bin/env: ‘sh\r’: Permission denied #314

Open
Fresa opened this issue Jan 3, 2025 · 5 comments
Open

Bug: /usr/bin/env: ‘sh\r’: Permission denied #314

Fresa opened this issue Jan 3, 2025 · 5 comments
Labels
bug Something isn't working

Comments

@Fresa
Copy link

Fresa commented Jan 3, 2025

Helm version: v3.16.4
helm-git version: v1.3.0
Git version: 2.34.1

Steps To Reproduce

  1. brew install helm
  2. helm plugin install https://github.com/aslafy-z/helm-git --version 1.3.0
  3. helm fetch git+https://github.com/jetstack/cert-manager@deploy/charts/cert-manager-v0.6.2.tgz?ref=v0.6.2

Output:
/usr/bin/env: ‘sh\r’: Permission denied
Error: plugin "helm-git" exited with error

@Fresa Fresa added the bug Something isn't working label Jan 3, 2025
@aslafy-z
Copy link
Owner

aslafy-z commented Jan 3, 2025

Hey! Can you please cat -e helm-git-plugin.sh | head within the plugin folder, usually in $HOME/local/share/helm/plugins.
Also, can you share your global git config - strip any credentials (usually at $HOME/.gitconfig).
Which OS are you running?

@aslafy-z
Copy link
Owner

aslafy-z commented Jan 3, 2025

Can you also try to install the plugin like:

helm plugin install https://github.com/aslafy-z/helm-git/archive/refs/tags/v1.3.0.tar.gz

@Fresa
Copy link
Author

Fresa commented Jan 3, 2025

Can you also try to install the plugin like:

helm plugin install https://github.com/aslafy-z/helm-git/archive/refs/tags/v1.3.0.tar.gz

Error: extracting files from archive: unknown type: 110010 in helm-git-1.3.0/tests/fixtures/example-chart-symlink/chart/crds

@Fresa
Copy link
Author

Fresa commented Jan 3, 2025

Hey! Can you please cat -e helm-git-plugin.sh | head within the plugin folder, usually in $HOME/local/share/helm/plugins. Also, can you share your global git config - strip any credentials (usually at $HOME/.gitconfig). Which OS are you running?

cat -e /home/xxx/.local/share/helm/plugins/helm-git/helm-git-plugin.sh | head

#!/usr/bin/env sh^M$
^M$
# See Helm plugins documentation: https://docs.helm.sh/using_helm/#downloader-plugins^M$
^M$
set -eu^M$
^M$
# Mark this shell^M$
# shellcheck disable=SC2034^M$
HELM_GIT_SOURCE=1^M$
^M$

uname -r
5.15.167.4-microsoft-standard-WSL2

cat /etc/os-release

PRETTY_NAME="Ubuntu 22.04.5 LTS"
NAME="Ubuntu"
VERSION_ID="22.04"
VERSION="22.04.5 LTS (Jammy Jellyfish)"
VERSION_CODENAME=jammy
ID=ubuntu
ID_LIKE=debian
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
UBUNTU_CODENAME=jammy

git config --list

core.autocrlf=true
core.safecrlf=true

@Fresa
Copy link
Author

Fresa commented Jan 3, 2025

setting core.autocrlf=input and reinstalling both the plugin and helm (including wiping the plugin cache folder) seems to have done the trick!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants