Open JustusGreiberORGADATA opened 11 months ago
I guess we need to upstream https://github.com/microsoft/git/pull/598 (patches 2-4, that is).
git -c "core.askPass=true" -c "credential.interactive=false" for-each-repo --config=maintenance.repo maintenance run --schedule=daily
FWIW the reason why this does not work as intended is that credential.interactive
is only supported in the Microsoft fork of Git so far.
Setup
When our git server restarts the git client will fail to authenticate and use askPass to ask for a username and password. The restarts coincide with the times set in the task scheduler by
git maintenance start
. IMHO the issue is a general one though and not really special to this environment.Details
Git Bash in Windows Terminal. But in the real world this issue likely happens outside the terminal in the Windows Task Scheduler.
The actual problem occurs when git maintenance tasks are running in the Windows Task Scheduler. The minimal example below just reproduces the issue in a terminal.
I expected headless-git to not start any terminal interaction, because there is no way for the user to interact with the terminal. If headless-git is just a helper to facilitate
git maintenance start
I could live with the fact that it is not truly "headless" as long as the task that are registered in the Windows Task Scheduler set git config values to prevent the terminal interactions, e. g.(This is not a good solution if the graphical user interfaces triggered by askPass and Credential Manager are desired though and only the terminal interaction should be suppressed. I sadly haven't found a config value to only deactivate terminal interaction.)
It did start a terminal interaction and locked all maintenance commands.