Using git for windows (git-scm.com) and a script, i can get Bash to stop asking for the passphrase but i can not seem to remove the passphrase prompt from git GUI.
The url to the remote is using the ssh link (see below), so im pretty sure this is not the problem. But i am not an expert in git nor SSH..
[email protected]:repo
The SSH keys (ED25519) have been created with a passphrase provided and the public key was added to the hosting account. The SSH keys are stored in the typical location C:\Users\<user>\.ssh\id_ed25519
. When clicking Help->Show SSH Key
in the GUI, it shows my ssh key that is being used. The ssh-agent is running in the background and the ssh key has been added to the ssh-agent via the setup below.
Setting up the ssh-agent i had used the code provided here (copied and pasted below for reference) to create the .bashrc
file under the C:\Users\<user>
path. Everything seems to be running as expected under the bash prompt but not the Git GUI.
env=~/.ssh/agent.env
agent_load_env () { test -f "$env" && . "$env" >| /dev/null ; }
agent_start () {
(umask 077; ssh-agent >| "$env")
. "$env" >| /dev/null ; }
agent_load_env
# agent_run_state: 0=agent running w/ key; 1=agent w/o key; 2= agent not running
agent_run_state=$(ssh-add -l >| /dev/null 2>&1; echo $?)
if [ ! "$SSH_AUTH_SOCK" ] || [ $agent_run_state = 2 ]; then
agent_start
ssh-add
elif [ "$SSH_AUTH_SOCK" ] && [ $agent_run_state = 1 ]; then
ssh-add
fi
unset env
To me, it seems like the Git GUI is not using the ssh-agent when performing an push, fetch, or any other related remote feature. Is there a step i missed in setting up the ssh-agent, .bashrc
script, and or the GUI to finish removing the passphrase prompt? or is there something else going on?
Any and all help is much appreciated, Thanks in advance
git gui
command, git GUI stops asking for the ssh passphrase... – Receiptor~/.ssh
folder as your ownC:\Users\<user>
does. – Dialogue