Frederick888 / git-credential-keepassxc

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

Failed to connect to Unix socket #85

Open projetmbc opened 1 year ago

projetmbc commented 1 year ago

Description

I think that I have missed one step... Here is my sessions in trying to use git-credential-keepassxc after allowing "Integration with web browsers" in the GUI of KeePassXC.

>>> git-credential-keepassxc caller me 
Gonna save current caller to allowed callers list:
{
  "path": "/usr/bin/bash",
  "uid": 1000,
  "gid": 1000,
  "canonicalize": false
}
Press Enter to continue...

>>> git-credential-keepassxc -vv configure
Oct 21 17:22:47.048 INFO Dump is disabled
Oct 21 17:22:47.049 INFO Reading configuration from /home/XXX/.config/git-credential-keepassxc
Oct 21 17:22:47.049 INFO Caller verification skipped as no caller profiles defined and strict-caller disabled
Oct 21 17:22:47.049 WARN Configuring database when strict-caller feature is enabled and no caller profiles are defined
You are about to configure a new database before configuring any callers while strict-caller feature is enabled.
You won't be able to use this program unless you plan to add caller profiles manually!
Tip: Check out `git-credential-keepassxc caller me --help` to add yourself to the allowed callers list.
Press Enter to continue... 
Oct 21 17:22:47.900 INFO Sending change-public-keys request
Oct 21 17:22:47.900 INFO Socket path: /run/user/1000/org.keepassxc.KeePassXC.BrowserServer
Oct 21 17:22:47.900 ERRO Failed to connect to Unix socket /run/user/1000/org.keepassxc.KeePassXC.BrowserServer, Caused by: Connection refused (os error 111)

How can I define one caller profiles? Can you clarify the following lines from the README file?

If you've enabled strict-caller, you must add caller profiles before configuring databases,
otherwise you won't be able to run git-credential-keepassxc afterwards.

Environment

Checklist

Configuration

Just one database.

Frederick888 commented 1 year ago

git-credential-keepassxc caller me should've added a 'caller profile', unless you cancelled it of cos.

  1. Does /home/XXX/.config/git-credential-keepassxc exist? What's in it?
  2. Do you have rwx permission to /home/XXX/.config?
  3. Does /run/user/1000/org.keepassxc.KeePassXC.BrowserServer exist and do you have rw permission to it?

I suspect there are some permission issues. Are you using things like Flatpak? Can you connect a browser extension to KPXC?

PS: Caller verification skipped as no caller profiles defined and strict-caller disabled: 'and strict-caller disabled' needs to be removed in this case. I'll fix that later.

projetmbc commented 1 year ago

Hello

  1. The content of /home/XXX/.config/git-credential-keepassxc is reduced to {}.
  2. Yes, I have : drwxr-xr-x 46 XXX XXX 4,0K 21 oct. 19:02 .config.
  3. /run/user/1000/org.keepassxc.KeePassXC.BrowserServer does not exist.

I am on manjaro-cinnamon.

Frederick888 commented 1 year ago

And rw on the config file too? And you did hit Enter after git-credential-keepassxc caller me, it reported no errors and wrote an empty config file? Try it again?

The socket issue was a separate one. Try fixing it and connecting a browser first. Check out https://github.com/keepassxreboot/keepassxc-browser/wiki/. It's not related to this project.

projetmbc commented 1 year ago

Ok for the content of git-credential-keepassxc caller me:

{
  "callers": [
    {
      "path": "/usr/bin/bash",
      "uid": 1000,
      "gid": 1000,
      "canonicalize": false
    }
  ]
}

I will look at the wiki.

Thanks for all.