Issue: when the user's ssh keys are password protected, they are prompted for password (twice) when commit-archive is enabled with a git ssh url, even if their ssh keys have been added to an ssh-agent
Expected behavior: user can start an ssh-agent session, enter their password once, and when they commit they are not prompted for ssh.
Reproduction steps:
ssh-keygen (enter a password, do not use generate ssh client-key since it will not make password-protected keys
eval $(ssh-agent)
ssh-add (enter your password)
(add the public key to github)
conf
set system config-management commit-archive location git://git@github.com:<username>/<repo>.git
commit
(you will be prompted for the password twice, once for pull once for push)
Tested on: VyOS 1.5-rolling-202412100007
Planned fix: I made a live change to the GitC#upload method on my test system to add SSH_AUTH_SOCK and SSH_AGENT_PID to the env dictionary that is passed to the git command. I'll add some validation and get a PR put together soon.
EDIT: removed formatting marks from the repro steps