# Install dependencies
$ sudo apt install make gcc git libsecret-1-0 libsecret-1-dev libglib2.0-dev
# Compile binary
$ sudo make --directory=/usr/share/doc/git/contrib/credential/libsecret
# Configure git to use binary as credential storage
$ git config --global credential.helper /usr/share/doc/git/contrib/credential/libsecret/git-credential-libsecret
The last command will create an entry in the global ~/.gitconfig
file:
$ cat ~/.gitconfig
[credential]
helper = /usr/share/doc/git/contrib/credential/libsecret/git-credential-libsecret
Next, create a personal access token (PAT) with read_repository
and write_repository
permissions. Use the PAT as the password. The username can be arbitrary but I recommend to use the PAT name to avoid confusion later.
Everything is in place now. After the first git clone
, a second git clone
should work without authentication.