Skip to main content
Topic solved
This topic has been marked as solved and requires no further attention.
Topic: Git certainly does not work anymore, has to do with gnome-keyring-daemon? (Read 819 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Git certainly does not work anymore, has to do with gnome-keyring-daemon?

Hello,
I normally always commit/push my project-files via a Jetbrains-IDE and there, vererything works. But when I tried to do it manually with git, I first got the error that I need libsecret. From there I installed gnome-keyring (I followed the arch-wiki). Now I sometimes get this warning when I start my zsh-terminal:
Quote
** Message: 21:29:35.549: couldn't access control socket: /run/user/1000/keyring/control: No such file or directory
And when I execute
Code: [Select]
git push ...
I get this error:
Quote
** (process:2599): CRITICAL **: 21:23:04.431: store failed: Error calling StartServiceByName for org.freedesktop.secrets: Timeout was reached
I really don't know how to solve this error.

I have this in my .zshenv:
Code: [Select]
if [ -n "${DESKTOP_SESSION}" ]; then
    eval $(gnome-keyring-daemon --start)
    export SSH_AUTH_SOCK
fi
And this in my /etc/pam.d/login:
Code: [Select]
#%PAM-1.0

auth       required     pam_securetty.so
auth       requisite    pam_nologin.so
auth       include      system-local-login
auth    optional     pam_gnome_keyring.so
account    include      system-local-login
session    include      system-local-login
session    optional     pam_gnome_keyring.so auto_start

Thanks for your time!

Re: Git certainly does not work anymore, has to do with gnome-keyring-daemon?

Reply #1
For GitHub with a fresh git that hasn't pushed to GitHub before, something along these lines works:

Code: [Select]
$ git config --global user.email "something@somewhere"
$ git config --global user.name "something"
$ git commit
$ cd /usr/share/git/credential/libsecret/
$ sudo make
$ git config --global credential.helper /usr/share/git/credential/libsecret/git-credential-libsecret
$ git push origin master
Username for 'https://github.com': yourusername
Password for 'https://[email protected]': (paste in GitHub token thing you got from the website)
(pushes OK now)

Re: Git certainly does not work anymore, has to do with gnome-keyring-daemon?

Reply #2
For GitHub with a fresh git that hasn't pushed to GitHub before, something along these lines works:

Code: [Select]
$ git config --global user.email "something@somewhere"
$ git config --global user.name "something"
$ git commit
$ cd /usr/share/git/credential/libsecret/
$ sudo make
$ git config --global credential.helper /usr/share/git/credential/libsecret/git-credential-libsecret
$ git push origin master
Username for 'https://github.com': yourusername
Password for 'https://[email protected]': (paste in GitHub token thing you got from the website)
(pushes OK now)
I did the exact things you told me, but I still get the same error:
Quote
** (process:3578): CRITICAL **: 11:07:28.104: store failed: Error calling StartServiceByName for org.freedesktop.secrets: Timeout was reached
This is my ~/.gitconfig:
Code: [Select]
[user]
name = leo
email = [email protected]
[core]
autocrlf = input
[credential "https://github.com"]
helper = !/usr/bin/gh auth git-credential
[credential]
helper = /usr/share/git/credential/libsecret/git-credential-libsecret
[init]
defaultBranch = master
And this is my local  <project>/.git/config:
Code: [Select]
[core]
repositoryformatversion = 0
filemode = true
bare = false
logallrefupdates = true
[remote "origin"]
url = https://github.com/Leonardo-Gerling/Leonardo-Gerling.github.io
fetch = +refs/heads/*:refs/remotes/origin/*
[branch "master"]
remote = origin
merge = refs/heads/master

Re: Git certainly does not work anymore, has to do with gnome-keyring-daemon?

Reply #3
https://www.softwaredeveloper.blog/git-credential-storage-libsecret
I don't have gnome-keyring so don't get any errors from it. It's often a troublesome package unless you have the Gnome desktop to properly initialize it. I'm not sure you even need any credential helper if you don't mind putting in the username and token every time, I just followed advice from the GitHub help pages when they brought in the token thing on GitHub.

Re: Git certainly does not work anymore, has to do with gnome-keyring-daemon?

Reply #4
https://www.softwaredeveloper.blog/git-credential-storage-libsecret
I don't have gnome-keyring so don't get any errors from it. It's often a troublesome package unless you have the Gnome desktop to properly initialize it. I'm not sure you even need any credential helper if you don't mind putting in the username and token every time, I just followed advice from the GitHub help pages when they brought in the token thing on GitHub.

Weird. Everything works when I execute this:
Code: [Select]
$ git push -v [email protected]:<User>/<User>.github.io.git    
                                               
Pushing to github.com:<User>/<User>.github.io.git
To github.com:<User>/<User>.github.io.git
 = [up to date]      master -> master
Everything up-to-date

 

Re: Git certainly does not work anymore, has to do with gnome-keyring-daemon?

Reply #5
https://www.softwaredeveloper.blog/git-credential-storage-libsecret
I don't have gnome-keyring so don't get any errors from it. It's often a troublesome package unless you have the Gnome desktop to properly initialize it. I'm not sure you even need any credential helper if you don't mind putting in the username and token every time, I just followed advice from the GitHub help pages when they brought in the token thing on GitHub.
I solved it by installing lssecret-git and gnome-keyring-query whilst also unlocking the default keyring on login by editing my /etc/pam.d/passwd:
Code: [Select]
#%PAM-1.0

#password required pam_cracklib.so difok=2 minlen=8 dcredit=2 ocredit=2 retry=3
#password required pam_unix.so sha512 shadow use_authtok
password required pam_unix.so sha512 shadow nullok
password optional pam_gnome_keyring.so