Frederick888 / git-credential-keepassxc

Helper that allows Git (and shell scripts) to use KeePassXC as credential store
GNU General Public License v3.0
196 stars 8 forks source link

Trouble Retrieving Password From Shell #77

Closed tompurl closed 1 year ago

tompurl commented 1 year ago

Description

I have an entry under the /Git folder with the following properties:

I'm trying to access the password like this:

printf "url=bogus.com\nusername=bogus@bogus.com\n" | git-credential-keepassxc get
Apr 10 20:27:20.304 ERRO Request get-logins failed, No logins found (code: NoLoginsFound), Caused by: N/A

I'm assuming that I'm missing something in the docs although I promise I have read them multiple times :-) I would be happy to update the wiki once I know how to do this.

Environment

Checklist

Configuration

1

Logs

Apr 10 20:30:59.605 INFO Dump is disabled
Apr 10 20:30:59.605 INFO Reading configuration from /home/tom/.config/git-credential-keepassxc
Apr 10 20:30:59.605 INFO Caller verification skipped as no caller profiles defined and strict-caller disabled
Apr 10 20:30:59.606 INFO Sending change-public-keys request
Apr 10 20:30:59.606 INFO Socket path: /run/user/1000/org.keepassxc.KeePassXC.BrowserServer
Apr 10 20:30:59.607 INFO Sending test-associate request
Apr 10 20:30:59.608 INFO Successfully authenticated against 1 database(s)
Apr 10 20:30:59.608 INFO Sending get-logins request
Apr 10 20:30:59.617 WARN Request get-logins failed, No logins found (code: NoLoginsFound)
Apr 10 20:30:59.617 ERRO Request get-logins failed, No logins found (code: NoLoginsFound), Caused by: N/A
Frederick888 commented 1 year ago

If you have Browser Integration -> Match URL Scheme on, try printf "url=https://bogus.com\nusername=bogus@bogus.com\n" (https://github.com/keepassxreboot/keepassxc/blob/4dcd41975d9be75f2e18b533d5443edfbc3752c7/src/browser/BrowserService.cpp#L1101-L1103).

If it's off, try printf "url=http://bogus.com\nusername=bogus@bogus.com\n" (https://doc.qt.io/qt-6/qurl.html#fromUserInput)