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

helm plugin install cannot symlink on Windows #4418

Closed
bacongobbler opened this issue Aug 1, 2018 · 8 comments
Closed

helm plugin install cannot symlink on Windows #4418

bacongobbler opened this issue Aug 1, 2018 · 8 comments
Labels
bug Categorizes issue or PR as related to a bug.

Comments

@bacongobbler
Copy link
Member

Due to how os.Symlink is implemented, currently we cannot create symbolic links on Windows unless we are running helm in a terminal as an administrator.

If we are running under normal privileges, we see this error:

helm plugin install https://github.com/adamreese/helm-last
Error: symlink C:\Users\mafishe\.helm\cache\plugins\https-github.com-adamreese-helm-last C:\Users\mafishe\.helm\plugins\helm-last: A required privilege is not held by the client.

This will be fixed in Go 1.11 when os.Symlink starts supporting the new WinAPI for creating symlinks without elevated privileges. See https://go-review.googlesource.com/c/go/+/99337 for more context.

@bacongobbler bacongobbler added the bug Categorizes issue or PR as related to a bug. label Aug 1, 2018
@bacongobbler bacongobbler added this to the 2.11.0 - Features milestone Aug 1, 2018
@bacongobbler
Copy link
Member Author

I'll take this on as an action item to fix up in 2.11.

@thomastaylor312
Copy link
Contributor

We are going to have to push this out because the Go 1.11 release was pushed out. We will add this in a bugfix release

@agentgonzo
Copy link

This doesn't work with Go 1.11 and helm 2.11:

$ ./helm.exe version
Client: &version.Version{SemVer:"v2.11.0", GitCommit:"2e55dbe1fdb5fdb96b75ff144a339489417b146b", GitTreeState:"clean"}
Server: &version.Version{SemVer:"v2.10.0", GitCommit:"9ad53aac42165a5fadc6c87be0dea6b115f93090", GitTreeState:"clean"}
$ go version
go version go1.11.1 windows/amd64
$ ./helm plugin install https://github.com/adamreese/helm-last
Error: symlink C:\Users\Steve\.helm\cache\plugins\https-github.com-adamreese-helm-last C:\Users\Steve\.helm\plugins\helm-last: A required privilege is not held by the client.

@bacongobbler
Copy link
Member Author

Yep, haven't gotten to it yet. :)

@bacongobbler
Copy link
Member Author

fixed in #4637

@ajpaulson
Copy link

Client: &version.Version{SemVer:"v2.12.1", GitCommit:"02a47c7249b1fc6d8fd3b94e6b4babf9d818144e", GitTreeState:"clean"}
helm plugin install https://github.com/lrills/helm-unittest
Error: symlink C:\<REDACTED USER PATH>\.helm\cache\plugins\https-github.com-lrills-helm-unittest C:\<REDACTED USER PATH>\.helm\plugins\helm-unittest: A required privilege is not held by the client.

@bacongobbler - I'm not sure that #4637 actually fixed this - can you show an example test?

@bacongobbler
Copy link
Member Author

I based my assumption on this note in the Go 1.11 release notes:

Symlink now works for unprivileged users on Windows 10 on machines with Developer Mode enabled.

Do you have Developer Mode enabled?

@ajpaulson
Copy link

@bacongobbler ah! yes, company restriction prevents me enabling developer mode - I should have read closer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Categorizes issue or PR as related to a bug.
Projects
None yet
Development

No branches or pull requests

4 participants