This page looks best with JavaScript enabled

How to Store Git Credential in Ubuntu Linux Using Libsecret

 ·  β˜• 1 min read  ·  ✍️ shibu

Git credential storing using Libsecret

Installing libsecret

1
sudo apt install libsecret-1-0 libsecret-1-dev

Run make command for recompile. If you don’t have make command accessible install build essential

1
sudo apt install build-essential
1
2
cd /usr/share/doc/git/contrib/credential/libsecret
sudo make

Update git credential.helper

1
git config --global credential.helper /usr/share/doc/git/contrib/credential/libsecret/git-credential-libsecret

Alternative - git cache credential helper

If you don’t want to install anything you can use git credential helper.

Git Cache is quite secure and it keeps data only in memory.

It’s fine for security, but every time you open new session, you need to type credentials again. Memory is purged after 15 minutes (900 seconds ) by default, but it can be changed with optional timeout parameter.

1
git config --global credential.helper 'cache --timeout=300'
Share on

Shibu Deb Polo
WRITTEN BY
shibu
Web Developer