git-credential-keepassxc icon indicating copy to clipboard operation
git-credential-keepassxc copied to clipboard

Failed to connect to Unix socket

Open projetmbc opened this issue 2 years ago • 4 comments

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

  • OS: Linux Manjaro cinnamon
  • keepassxc --version output: KeePassXC 2.7.6
  • git-credential-keepassxc --version output: git-credential-keepassxc 0.13.0 (strict-caller, notification, encryption, yubikey)

Checklist

  • [ y ] I've read the README
  • [ y ] I've read the Wiki
  • [ n ] This is an issue regarding the project itself (instead of linking, packaging, anti-virus, etc.)

Configuration

Just one database.

projetmbc avatar Oct 21 '23 17:10 projetmbc

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.

Frederick888 avatar Oct 23 '23 01:10 Frederick888

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.

projetmbc avatar Oct 23 '23 07:10 projetmbc

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.

Frederick888 avatar Oct 23 '23 07:10 Frederick888

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.

projetmbc avatar Oct 23 '23 08:10 projetmbc