KiCAD always requests keychain unlock when Git project is opened
Description
KiCad 9 tries to access the system keychain whenever a project containing a .git structure is opened. In KiCad 8, Git functionality wasn't available, so this wasn't an issue before.
This issue is not about Git functionality per se (which is appreciated), but about KiCAD trying to access Git remotes automatically and via the wrong access method. I don't use the system keychain (Secrets Manager API on Linux) to store Git credentials.
Instead, I expected KiCad to:
- Not try to access a remote repository unless I ask for it (i.e. user-initiated push/pull)
- Not use the system keychain, but respect how Git remotes are configured (e.g. by using SSH keys and the SSH agent)
Steps to reproduce
- Open KiCad on a Linux system (other systems may have the same issue, but keychain handling may be different there)
- Create a new project
- Close KiCad
- Open a terminal and create an empty Git structure in the project directory just created (
git initis enough) - Open KiCad again
- Observe KiCad trying to access the system's keychain via Secret Service
- The user experience may vary depending on which keychain manager (KWallet, Gnome Keyring, KeepassXC, ...) is used as the default Secret Service and how it is configured.
- If the keychain is locked by default, it will prompt the user to unlock it.
Workaround
If Git functionality isn't needed, it can be disabled completely by adding this line to ${HOME}/.config/kicad/9.0/kicad_advanced:
EnableGit=0
It would be nice if this could also be made available in the KiCad preferences UI.
KiCad Version
Application: KiCad x86_64 on x86_64
Version: 9.0.0+dfsg-1, release build
Libraries:
wxWidgets 3.2.6
FreeType 2.13.3
HarfBuzz 10.2.0
FontConfig 2.15.0
libcurl/8.12.1 OpenSSL/3.4.1 zlib/1.3.1 brotli/1.1.0 zstd/1.5.6 libidn2/2.3.7 libpsl/0.21.2 libssh2/1.11.1 nghttp2/1.64.0 nghttp3/1.6.0 librtmp/2.3 OpenLDAP/2.6.9
Platform: Debian GNU/Linux trixie/sid, 64 bit, Little endian, wxGTK, X11, KDE, x11
Build Info:
Date: Feb 23 2025 15:00:42
wxWidgets: 3.2.6 (wchar_t,wx containers) GTK+ 3.24
Boost: 1.83.0
OCC: 7.8.1
Curl: 8.12.1
ngspice: 44.2
Compiler: GCC 14.2.0 with C++ ABI 1019
KICAD_IPC_API=ON
Locale:
Lang: en_GB
Enc: UTF-8
Num: 1,234.5
Encoded кΩ丈: D0BACEA9E4B888 (sys), D0BACEA9E4B888 (utf8)
Edited by onitake