How to use Git credential store on WSL (Ubuntu on Windows)?

前端 未结 5 426
有刺的猬
有刺的猬 2021-01-30 08:03

I\'ve tried following these instructions: https://stackoverflow.com/a/40312117/21728 which basically do this:

sudo apt-get install libsecret-1-0 libsecret-1-dev
         


        
5条回答
  •  执笔经年
    2021-01-30 09:03

    I have just recently updated to WSL2 and in my case the following wasn't working:

    "/mnt/c/Program\\ Files/Git/mingw64/libexec/git-core/git-credential-manager.exe"

    What worked was the following: git config --global credential.helper "/c/Program\\ Files/Git/mingw64/libexec/git-core/git-credential-manager.exe"

    Until I've removed /mnt/ from the path I was getting a "not found" error.

    From what I've investigated there's an issue with mounting windows drives in WSL2 after a clean Windows startup, more details here: https://github.com/microsoft/WSL/issues/4122 And that was the most probable cause in my case.

    Another reason for this can be a misconfiguration of root directory in /etc/wsl.conf

提交回复
热议问题