-
-
Notifications
You must be signed in to change notification settings - Fork 523
Description
Summary
The git version ( installed git portable, git version 2.42.0.windows.2 ) is not recognized by go pass, probably due to this - global gitconfig isn't read, in particular - user.email and user.name from gitconfig are not evaluated
Steps To Reproduce
set GOPASS_DEBUG=Y
gopass init --store pass_test
Output:
🍭 Initializing a new password store ...
2023/11/05 23:12:22.421286 gitconfig/configs.go:67 gitconfig.(*Configs).LoadAll Loading gitconfigs for &{Preset: system:0xc000e52940 global:0xc000e52980 local:0xc000e529c0 worktree:0xc000e52a00 env:0xc000e52a40 workdir: SystemConfig:/etc/gitconfig GlobalConfig:.gitconfig LocalConfig:config WorktreeConfig:config.worktree EnvPrefix:GIT_CONFIG NoWrites:false} ...
2023/11/05 23:12:22.421286 gitconfig/configs.go:73 gitconfig.(*Configs).LoadAll failed to load system config: open /etc/gitconfig: Das System kann den angegebenen Pfad nicht finden.
2023/11/05 23:12:22.421837 gitconfig/configs.go:156 gitconfig.(*Configs).loadGlobalConfigs loaded global config from C:\Users<username>\AppData\Roaming\gopass\config
2023/11/05 23:12:22.421837 gitconfig/configs.go:196 gitconfig.(*Configs).Get no value for user.name found
2023/11/05 23:12:22.421837 gitconfig/configs.go:67 gitconfig.(*Configs).LoadAll Loading gitconfigs for &{Preset: system:0xc000e52b40 global:0xc000e52b80 local:0xc000e52bc0 worktree:0xc000e52c00 env:0xc000e52c40 workdir: SystemConfig:/etc/gitconfig GlobalConfig:.gitconfig LocalConfig:config WorktreeConfig:config.worktree EnvPrefix:GIT_CONFIG NoWrites:false} ...
2023/11/05 23:12:22.422389 gitconfig/configs.go:73 gitconfig.(*Configs).LoadAll failed to load system config: open /etc/gitconfig: Das System kann den angegebenen Pfad nicht finden.
2023/11/05 23:12:22.422932 gitconfig/configs.go:156 gitconfig.(*Configs).loadGlobalConfigs loaded global config from C:\Users<username>\AppData\Roaming\gopass\config
2023/11/05 23:12:22.422932 gitconfig/configs.go:196 gitconfig.(*Configs).Get no value for user.email found
2023/11/05 23:12:22.422932 root/init.go:18 root.(*Store).IsInitialized initializing store and possible sub-stores
2023/11/05 23:12:22.423477 root/init.go:79 root.(*Store).initialize initialize - C:\Users<username>\AppData\Local\gopass\stores\root
2023/11/05 23:12:22.423527 leaf/store.go:52 leaf.New Instantiating "" at "C:\Users\\AppData\Local\gopass\stores\root"
2023/11/05 23:12:22.423527 backend/storage.go:59 backend.DetectStorage Trying requested gitfs for C:\Users<username>\AppData\Local\gopass\stores\root
2023/11/05 23:12:22.423527 fsutil/fsutil.go:36 fsutil.ExpandHomedir No tilde found in C:\Users<username>\AppData\Local\gopass\stores\root
2023/11/05 23:12:22.424626 fsutil/fsutil.go:36 fsutil.ExpandHomedir No tilde found in C:\Users<username>\AppData\Local\gopass\stores\root
2023/11/05 23:12:22.425170 gitconfig/configs.go:67 gitconfig.(*Configs).LoadAll Loading gitconfigs for &{Preset: system:0xc000e52d80 global:0xc000e52dc0 local:0xc000e52e00 worktree:0xc000e52e40 env:0xc000e52e80 workdir:C:\Users<username>\AppData\Local\gopass\stores\root.git SystemConfig:/etc/gitconfig GlobalConfig:.gitconfig LocalConfig:config WorktreeConfig:config.worktree EnvPrefix:GIT_CONFIG NoWrites:false} ...
2023/11/05 23:12:22.425170 gitconfig/configs.go:73 gitconfig.(*Configs).LoadAll failed to load system config: open /etc/gitconfig: Das System kann den angegebenen Pfad nicht finden.
2023/11/05 23:12:22.425793 gitconfig/configs.go:156 gitconfig.(*Configs).loadGlobalConfigs loaded global config from C:\Users<username>\AppData\Roaming\gopass\config
2023/11/05 23:12:22.435192 gitconfig/configs.go:98 gitconfig.(*Configs).LoadAll loaded local config from C:\Users<username>\AppData\Local\gopass\stores\root.git\config
2023/11/05 23:12:22.435780 gitconfig/configs.go:109 gitconfig.(*Configs).LoadAll failed to load worktree config from C:\Users<username>\AppData\Local\gopass\stores\root.git\config.worktree: open C:\Users<username>\AppData\Local\gopass\stores\root.git\config.worktree: Das System kann die angegebene Datei nicht finden.
2023/11/05 23:12:22.436290 backend/storage.go:62 backend.DetectStorage Using requested gitfs for C:\Users<username>\AppData\Local\gopass\stores\root
2023/11/05 23:12:22.583478 gitfs/git.go:185 gitfs.(*Git).Version Failed to parse "2.42.0.windows.2" as semver: Invalid character(s) found in patch number "0.windows.2"
2023/11/05 23:12:22.584080 leaf/store.go:64 leaf.New Storage for => C:\Users<username>\AppData\Local\gopass\stores\root initialized as gitfs(0.0.0,path:C:\Users<username>\AppData\Local\gopass\stores\root)
Expected behavior
global gitconfig is read and gopass init don't ask for git.username and git.email (by setting respective environment variables - it works as expected though)
Environment
- OS: [e.g. Mac OS X High Sierra, Ubuntu 18.04, Windows 10, ...]
- OS version: [uname -a]
- gopass Version: [gopass version]
- Installation method: [e.g. from source, brew, gopass repo]
os version: windows 11 22H2 build 22621.2506
gopass 1.15.8 go1.20.7 windows amd64 (installed via scoop install gopass)
Additional context
probably related to the issue #214