1

I am trying to store my git credentials securely on my CentOS 7 machine using git-credential-libsecret without success, migrating from the insecure git-credential-store.

TLDR;

I cannot find any prebuilt binaries of git-credential-libsecret for CentOS 7. I would like to ask if anyone can link me to a repository that provides them, before resorting back to build from source.

Using Git 2.22.0 from IUS repo:

[XXX@YYY ~]# git --version
git version 2.22.0

credential.helper has been pointed to libsecret:

[XXX@YYY ~]# git config --list --show-origin
file:/home/XXX/.gitconfig   credential.helper=libsecret

Running git pull on a private repo prints this:

[XXX@YYY Foo-repo]# git pull
git: 'credential-libsecret' is not a git command. See 'git --help'.

Confirming that git-credential-libsecret is indeed not installed:

[XXX@YYY ~]# sudo ls /usr/libexec/git-core/ | grep credential
git-credential
git-credential-cache
git-credential-cache--daemon
git-credential-store

Active repositories:

base centos-sclo-rh centos-sclo-sclo elrepo epel extras ius remi-safe updates

Trying to install git-credential-libsecret:

[XXX@YYY ~]# sudo dnf provides git-credential-libsecret
Error: No Matches found

It seems like some other distros (e.g. Fedora) ships with repository that provides git-credential-libsecret (source), but not CentOS. I feel wary about installing from Fedora repo due to compatibility concerns.

cyqsimon
  • 2,752
  • 2
  • 17
  • 38

1 Answers1

0

Using Git 2.22.0 from IUS repo:

The IUS git222 package was forked from the Fedora git package. It follows the same layout, with a minimal set of functionality in the git222-core package, and the rest of the functionality (and all their dependencies) in the main git222 package. The file you are looking for is /usr/libexec/git-core/git-credential-libsecret.

# repoquery --whatprovides /usr/libexec/git-core/git-credential-libsecret | grep git222 | sort -V | tail -1
git222-0:2.22.4-1.el7.ius.x86_64

You can resolve this by installing the full git222 package.

# yum install git222

I feel wary about installing from Fedora repo due to compatibility concerns.

As you should, installing packages compiled for a different distribution typically breaks your system.

carlwgeorge
  • 627
  • 5
  • 13