IJHack / QtPass

QtPass is a multi-platform GUI for pass, the standard unix password manager.
https://qtpass.org/
GNU General Public License v3.0
1.01k stars 158 forks source link

git autopush assumes some default git config #534

Open rowanthorpe opened 4 years ago

rowanthorpe commented 4 years ago

I had been using manual gpg-encrypted passwords in my own hierarchy for a long time, then migrated to using "pass" after a bit of reorganizing, and more recently also use "qtpass" as a timesaver when I'm in a desktop context. For that reason my underlying git repo was setup long ago before apparently the default for "push.default" became "simple". Because I always previously pushed/pulled manually I always specified remote/branch without problem. Now though, when I configured qtpass to "automatically push" and "automatically pull", I noticed that auto-pushing wasn't actually happening with no outward notice about it. Only after running qtpass under strace (and tracing child-processes) did I notice that the "git push" (with no remote/branch args) executed from inside "pass" was silently failing because git prefers to bail-out than to assume the "push.default" in an old repo (or some reason along those lines). Once I added the following to my .git/config it worked fine, but it seems some kind of error-handling (at least a warning) from qtpass for such things would be better than nothing?

(... .git/config ...)

[push]
        default = simple
issue-label-bot[bot] commented 4 years ago

Issue-Label Bot is automatically applying the label bug to this issue, with a confidence of 0.58. Please mark this comment with :thumbsup: or :thumbsdown: to give our bot feedback!

Links: app homepage, dashboard and code for this bot.

rowanthorpe commented 4 years ago

...and unless I am mistaken I think in the end I needed to do a "pass git push -u --all" at least once to set the upstream tracking branches in order for bare "git pull" to then work as well (I did a lot of things so am not sure if it is that, and don't presently have time to reproduce that part of the problem exactly).