环境:AWS EC2
已验证我可以在通用 ec2 用户帐户下运行 helm,但无法在个人用户下运行它。
我的用户帐户返回此错误:
WARNING: stat /home/$USER.config/helm/registry/config.json: permission denied
/home/$USER/.config/helm/registry/config.json oras.land/oras-go/pkg/auth/docker.NewClientWithDockerFallback oras.land/[email protected]/pkg/auth/docker/client.go:80 helm.sh/helm/v3/pkg/registry.NewClient helm.sh/helm/v3/pkg/registry/client.go:83 main.newDefaultRegistryClient helm.sh/helm/v3/cmd/helm/root.go:277 main.newRootCmd helm.sh/helm/v3/cmd/helm/root.go:155 main.main helm.sh/helm/v3/cmd/helm/helm.go:66 runtime.main runtime/proc.go:250 runtime.goexit runtime/asm_amd64.s:1598
我验证了我的 $PATH 有 /usr/local/bin 验证了 helm 上的权限,它们与 kubectl 相同,工作正常
检查权限并修复是否需要使用以下命令修复文件权限:
ls -al /home/$USER.config/helm/registry/config.json