Skip to content

Authentication

Vinzent edited this page Feb 6, 2023 · 1 revision

Linux

Recommeded: HTTPS

Storing

To securely store the username and password permanently without having to reenter it all the time you can use Git's Credential Helper. libsecret stores the password in a secure place. On GNOME it's backed up by GNOME Keyring and on KDE KDE Wallet.

git config --global credential.helper libsecret

You have to do one authentication action (clone/pull/push) after setting the helper in the terminal. Ater that you should be able to clone/pull/push in Obsidian without any issues.

In case you get the message git: 'credential-libsecret' is not a git command, libsecret is not installed on your system. You may have to install it by yourself. Here is an example for Ubuntu.

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

sudo make --directory=/usr/share/doc/git/contrib/credential/libsecret

# NOTE: This changes your global config, in case you don't want that you can omit the `--global` and execute it in your existing git repository.
git config --global credential.helper \
   /usr/share/doc/git/contrib/credential/libsecret/git-credential-libsecret

GUI Support

In case you don't want to store it permanently you can install ksshaskpass (it's preinstalled on KDE systems) and set it as binary to ask for the password.

NOTE: This changes your global config, in case you don't want that you can omit the --global and execute it in your existing git repository.

git config --global core.askPass "ksshaskpass"

You should get a prompt to enter your username/password in Obsidian now.

SSH

By installing ksshaskpass (it's preinstalled on KDE systems) you can use SSH to authenticate. You have to add your SSH key to the ssh-agent and set ksshaskpass as binary to ask for the password.

sudo ln /usr/bin/ksshaskpass /usr/lib/ssh/ssh-askpass

macOS

HTTPS

Run the following to use the macOS keychain to store your credentials.

git config --global credential.helper osxkeychain

You have to do one authentication action (clone/pull/push) after setting the helper in the terminal. After that you should be able to clone/pull/push in Obsidian without any issues.