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

Helm V3 requires sudo access for MAC OS

Open ecout opened this issue 5 years ago • 4 comments

Helm Version: helm version version.BuildInfo{Version:"v3.0.2", GitCommit:"19e47ee3283ae98139d98460de796c1be1e3975f", GitTreeState:"clean", GoVersion:"go1.13.5"}

As regular user: helm plugin install https://github.com/hypnoglow/helm-s3.git -v 1 Error: Unable to update repository: exit status 1

As superuser

sudo su -
Password:
#####-MacBook-Pro:~ root# helm plugin install https://github.com/hypnoglow/helm-s3.git -v 1
Downloading and installing helm-s3 v0.9.0 ...
Checksum is valid.
Installed plugin: s3
#-#-MacBook-Pro:~ root# helm plugin list
NAME	VERSION	DESCRIPTION                                                                                
s3  	0.9.0  	The plugin allows to use s3 protocol to upload, fetch charts and to work with repositori...

Exit sudo mode:
#####-MacBook-Pro:~ root# exit
logout
#-#-MacBook-Pro:update-controllers local_user$ helm plugin list
NAME	VERSION	DESCRIPTION

Notice that no plugins are listed as common user.

Now, this is strange as by default all helm configuration files are stored under $HOME +------------------+---------------------------+--------------------------------+-------------------------+ | Operating System | Cache Path | Configuration Path | Data Path | +------------------+---------------------------+--------------------------------+-------------------------+ | Linux | $HOME/.cache/helm | $HOME/.config/helm | $HOME/.local/share/helm | | macOS | $HOME/Library/Caches/helm | $HOME/Library/Preferences/helm | $HOME/Library/helm | | Windows | %TEMP%\helm | %APPDATA%\helm | %APPDATA%\helm | +------------------+---------------------------+--------------------------------+-------------------------+

ecout avatar Dec 27 '19 22:12 ecout

Even doing sudo as regular user fails Where are the plugins being stored? It seems like a permissions issue with V3. sudo helm plugin install https://github.com/hypnoglow/helm-s3.git -v 1 Error: Unable to update repository: exit status 1

ecout avatar Dec 27 '19 22:12 ecout

I'm tracing this in paralell with an issue logged in the helm v3 side.

For root this is what we get:

helm plugin install https://github.com/hypnoglow/helm-s3.git Downloading and installing helm-s3 v0.9.0 ... Checksum is valid. Installed plugin: s3 Local-Users-MacBook-Pro:~ root# ls -altrh /var/root/Library/helm/plugins total 0 drwxr-xr-x 3 root wheel 96B Dec 27 14:37 .. lrwxr-xr-x 1 root wheel 76B Dec 30 15:39 helm-s3.git -> /var/root/Library/Caches/helm/plugins/https-github.com-hypnoglow-helm-s3.git drwxr-xr-x 3 root wheel 96B Dec 30 15:39 .

ecout avatar Dec 30 '19 23:12 ecout

Hi @ecout, any success with this? Seems weird... I can only say that helm-s3 should not affect the plugin installation itself (helm plugin install). I was thinking about the post-install hook, but you don't get any messages from that script (e.g. "Downloading and installing helm-s3 v0.9.0"), so probably it does not even get to the hook.

I think the issue is somewhere near this: https://github.com/Masterminds/vcs/blob/master/git.go#L133 Seems that git is failing, unfortunately we cannot dump the command output from the wrapped error.

By the way, can you please check contents and permissions of helm directories (for regular user): $HOME/Library/Caches/helm, $HOME/Library/Preferences/helm, $HOME/Library/helm

hypnoglow avatar Jan 09 '20 19:01 hypnoglow

I fixed this by removing ~/.helm, ~/.local/share/helm and ~/.cache/helm and starting fresh (on my linux box). I've had a number of different helm 2 and 3 installs and I guess this is caused by old data from v2 hanging around...

cablespaghetti avatar Apr 20 '20 12:04 cablespaghetti