Skip to content

helm plugin install cannot symlink on Windows #4418

Closed

Description

@bacongobbler

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.

Activity

  1. added
    bug
    on Aug 1, 2018
  2. added this to the 2.11.0 - Features milestone on Aug 1, 2018
  3. bacongobbler commented on Aug 1, 2018

    @bacongobbler
    MemberAuthor

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

  4. thomastaylor312 commented on Aug 24, 2018

    @thomastaylor312
    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

  5. agentgonzo commented on Oct 24, 2018

    @agentgonzo

    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.
    
  6. bacongobbler commented on Oct 24, 2018

    @bacongobbler
    MemberAuthor

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

  7. bacongobbler commented on Nov 10, 2018

    @bacongobbler
    MemberAuthor

    fixed in #4637

  8. ajpaulson commented on Jan 9, 2019

    @ajpaulson
    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?

  9. bacongobbler commented on Jan 10, 2019

    @bacongobbler
    MemberAuthor

    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?

  10. ajpaulson commented on Jan 16, 2019

    @ajpaulson

    @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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions