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

How to let QtPass use the real "pass" on windows #458

Closed
christian-weiss opened this issue May 18, 2019 · 2 comments
Closed

How to let QtPass use the real "pass" on windows #458

christian-weiss opened this issue May 18, 2019 · 2 comments
Labels
interoperability Windows

Comments

@christian-weiss
Copy link

@christian-weiss christian-weiss commented May 18, 2019

I have setup "git bash" on my windows machine and i am using my "pass" within git bash.

Instead of using the "pass imitation" (see https://github.com/IJHack/QtPass/blob/master/src/pass.cpp#L13) i want to let QtPass to use the real pass command line tool.

First i thought a windows .bat file as a wrapper could be a quick workaround:

set drive=%CD:~0,1%
IF NOT EXIST %LOCALAPPDATA%\Programs\Git\bin\bash.exe (
    echo %LOCALAPPDATA%\Programs\Git\bin\bash.exe is missing. Please install git bash by installing git for windows. https://git-scm.com/download/win
	exit /B 1
)
%LOCALAPPDATA%\Programs\Git\bin\bash.exe -c "export PASSWORD_STORE_DIR=/%drive%/%subpath%; pass '%1' '%2' '%3' '%4' '%5' '%6' '%7' '%8' '%9'"

but then i realized that pass is using interactive mode for pass insert which do not work that way.

Would be nice if you would add support for "git bash" on windows (to point QtPass to /usr/bin/pass).

That way it would be possible to use a maybe newer version, an older version or a custom patched version of pass.

@christian-weiss
Copy link
Author

@christian-weiss christian-weiss commented May 19, 2019

The above proposal may involve a lot of integration testing.

A quick win would be if you can add a "Open folder in git bash" to the context menu (similar to the "Open folder with file manager). This command should be only visable when SETTINGS / PROGRAMS / NATIV / GIT BASH (new config option) is defined.

CMD command is:

START /D e:\passwordstore\ %LOCALAPPDATA%\Programs\Git\bin\bash.exe

where %LOCALAPPDATA%\Programs\Git\bin\bash.exe is from SETTINGS / PROGRAMS / NATIV / GIT BASH and e:\passwordstore\ should come from SETTINGS / PROFILE (current active passwordstore location) - just add the context menu "dir names".

@annejan annejan added interoperability Windows labels Aug 20, 2019
@annejan
Copy link
Member

@annejan annejan commented Oct 17, 2019

Now working on this in #489

@annejan annejan closed this as completed Oct 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
interoperability Windows
Projects
None yet
Development

No branches or pull requests

2 participants