Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Git + libsecret throws "Cannot autolaunch D-Bus without X11 $DISPLAY"

I've installed Git and libsecret on an CentOS 7 Server. I used git-credentials-store to store my credentials in clear text on the server. Now I wanna use libsecret but unfortunately I'm getting D-Bus errors, if I configure git-credential-libsecret as credential helper.

I've already installed dbus and dbus-x11 and launched dbus via below command but I'm still getting errors.

dbus-launch --sh-syntax

Error:

$ git pull origin master

** (process:66155): CRITICAL **: 08:19:33.936: could not connect to Secret Service: Cannot autolaunch D-Bus without X11 $DISPLAY

** (process:66160): CRITICAL **: 08:19:34.209: store failed: Cannot autolaunch D-Bus without X11 $DISPLAY

EDIT:

After installation of gnome-keyring I get the following error

** Message: 14:10:49.566: Remote error from secret service: org.freedesktop.DBus.Error.UnknownMethod: No such interface 'org.freedesktop.Secret.Collection' on object at path /org/freedesktop/secrets/collection/login

like image 323
Paul1896 Avatar asked Dec 05 '18 08:12

Paul1896


1 Answers

You need to use export $(dbus-launch) to evaluate the variables which dbus-launch outputs, so that ${DBUS_SESSION_BUS_ADDRESS} is set in your environment. See also: How to export DBUS_SESSION_BUS_ADDRESS

If ${DBUS_SESSION_BUS_ADDRESS} is not set in your environment, the D-Bus client library will assume no dbus-daemon is running and will attempt to auto-launch one. Without a ${DISPLAY}, that’s not possible; hence the error message you see.

like image 195
Philip Withnall Avatar answered Oct 17 '22 08:10

Philip Withnall