Skip to content
Discussion options

You must be logged in to vote

You can use StackedConfig.default() to get the config in /etc/gitconfig and ~/.gitconfig:

E.g.:

% python3
Python 3.13.9 (main, Oct 15 2025, 14:56:22) [GCC 15.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
f>>> from dulwich.config import StackedConfig
>>> x = StackedConfig.default()
>>> x.get("user", "name")
b'Jelmer Vernoo\xc4\xb3'

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@Secrus
Comment options

Answer selected by jelmer
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants