obsidian-git: [Bug]: passphrase is missing for gpg key
Describe the bug
Issue
when using global git configs on linux gpg fails to run properly.
- Expected result:
- Git repo signs files properly without extra local settings
- Actual result:
- Obsidian git fails to sign the files and doesnt detect changes as a result
Relevant errors (if available)
VM110:78 Uncaught (in promise) Error: error: gpg failed to sign the data
fatal: failed to write commit object
at Object.action (eval at <anonymous> (app.js:1), <anonymous>:2120:29)
at PluginStore.exec (eval at <anonymous> (app.js:1), <anonymous>:2155:29)
at eval (eval at <anonymous> (app.js:1), <anonymous>:2594:43)
at new Promise (<anonymous>)
at GitExecutorChain.handleTaskData (eval at <anonymous> (app.js:1), <anonymous>:2592:16)
at GitExecutorChain.eval (eval at <anonymous> (app.js:1), <anonymous>:2576:44)
at Generator.next (<anonymous>)
at fulfilled (eval at <anonymous> (app.js:1), <anonymous>:2496:28)
Steps to reproduce
Steps to reproduce
- Have obsidian installed on linux either flatpak or appimage
- configure globally for git to sign files using your yubikey or other smartcard
- attempt to push changes to repo with obsidian git
Steps to solve temporarily
- Import global configs into local config
- attempt to backup using obsidian git
- watch it work properly
Expected Behavior
I am expecting it to work with global configurations.
Addition context
Relavent information
install type: flatpak (linux)
os: fedora silverblue
pgp setup: stored on yubikey
git version: 2.31.1
gpg version: 2.2.27
Git configs
Global (ommiting personal data)
[user]
signingKey = [REDACTED]
email = [REDACTED]
name = arouzing
[commit]
gpgsign = true
[init]
defaultBranch = master
[credential]
helper = store
[gpg]
program = /usr/bin/gpg
Local (ommitting personal data)
[core]
repositoryformatversion = 0
filemode = true
bare = false
logallrefupdates = true
[remote "origin"]
url = git@github.com:[REDACTED]
fetch = +refs/heads/*:refs/remotes/origin/*
[branch "master"]
remote = origin
merge = refs/heads/master
[user]
email = [REDACTED]
name = arouzing
Operating system
Linux
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 3
- Comments: 15 (3 by maintainers)
I use below to bypass it
same here on mac
Anyway, it backed up automatically now
Same issue on MacOS.
GPG settings are defined in global .gitconfig. GPG keychain is setup and works for me when setting up commits outside of obsidian git. The workaround of putting GPG settings into the local config works for me.
does not help a lot when you actually want to authenticate with it…