Open annejan opened 5 years ago
Issue-Label Bot is automatically applying the label feature_request
to this issue, with a confidence of 0.81. Please mark this comment with :thumbsup: or :thumbsdown: to give our bot feedback!
Links: app homepage, dashboard and code for this bot.
Exploration, first step: https://tutorials.ubuntu.com/tutorial/tutorial-ubuntu-on-windows
Funniest thing I noticed . . you can sudo apt install qtpass
on Ubuntu on Windows ;)
I did not do this (yet) . .
wsl
support seems good, will add wsl
and wsl-app detection to the Autodetect feature . .
Are there news on this?
I guess "WSL"-based or "Git for Windows => git bash"-based integration is for advanced users. As "WSL" documentation says on nearly every page "this is for developers", and as "PowerShell" documentation says "this is for system administrators" someone may be scared (enabling of PowerShell required, enabling of WSL support, reboot, installing Ubuntu form Microsoft Store, etc.). While "Git for Windows" may be feel more like "installing an app" (feels simple). But lets see, which is easyer to integrate... Personally i like the idea of using WSL, but i also have to dig deeper...
I created a basic wrapper script (windows batch file): https://gist.github.com/christian-weiss/34c3f8f0e27ab26c0138f5b1e286b2b1 which is based on my wrapper for "git bash" (Git for Windows). Tested on Windows 10. This is just a starting point for further experiments.
It required some preparation steps (see below). But lets focus first on my findings:
Debugging is hard.
Host System:
Windows Batch files are not fun to work with:
Ubuntu Bash:
A QtPass dialog should warn when bash-process is not finished after 30 seconds - ask for "kill bash" or "wait again 30 seconds". Do not close QtPass when bash-process is still running - show dialog: ask "kill bash" or "wait again 30 seconds". QtPass, in general, should have a timeout implemented when executing "pass".
sudo apt-get update
sudo apt-get install pass
pass --version
# should be version 1.7.1 on Ubuntu 18.04
# To make drive letters available in upper and lower case run:
sudo ln -s c C
sudo ln -s d D
# etc. for all your drive letters
# this avoids to do lowercase conversions in your win-batch files
#configure git:
git config --global user.email "christian.weiss@web-impressions.de"
git config --global user.name "Christian Weiss"
# configure ssh to accept your git repo servers:
# (replace "gitlab.fritz.box" with URL to your password store repo server)
ssh-keyscan gitlab.fritz.box >> ~/.ssh/known_hosts
configure ssh auth create the file ~/.ssh/config with following content
Host gitlab gitlab.fritz.box
Hostname gitlab.fritz.box
Port 22
User git
IdentityFile ~/.ssh/gitlab
copy your privat ssh key file to ~/.ssh/gitlab set permissions
chmod 0600 ~/.ssh/config
chmod 0600 ~/.ssh/gitlab
because you can not execute it directly from C:\Windows\System32\bash.exe
copy C:\Windows\System32\bash.exe %APPDATA%\WSL\bash.exe
If you want to copy it to a different location then do not forget to set BASH_CUSTOM_PATH environment variable (system variable).
In your password store directory (to not commit your debug log):
echo "pass_wsl_wrapper.log" >> .gitignore
git add .gitignore
git commit -m "ignore qtpass wrapper for WSL log file"
git push
Sorry, is this even remotely working with WSL?
I installed the latest binary for windows, when I start it, I get a message I should install Ubuntu using WSL. I did, I also installed gpg in it, but I'm getting the same message every time. Where to go from here?
@minikN please check your log file (pass_wsl_wrapper.log) for BASH_PATH. I guess the bash.exe from git for wirndows is not installed, blocked by your windows/firewall or your BASH_CUSTOM_PATH is not set or not correct, or QtPass was not restarted after setting this system var.
Let's see if this works or needs some love . .