Hello,
I'm using the latest Sourcetree (new installed).
I've set up my SSH client configuration to use my pregenerated SSH key with PuTTY / Plink and all actions within the GUI work as expected.
But when I try to use the terminal, any git operation results in an error:
git fetch
git@hidden: Permission denied (publickey).
fatal: Could not read from remote repository.
I already tried to check my ssh-agent status, but it seems that it is not running or doing anything:
ssh-add -l
Could not open a connection to your authentication agent.
Any ideas?
I have been trying to share, let me try to send a screenshot
Hello Yasin,
Thank you. Setting up SSH Agent did not resolve the issue due to an invalid format. My old key was in format "PuTTY-User-Key-File-2":
Load key "privkey.ppk": invalid format
Opening the key with PuTTY Key Generator and choosing Conversions > Export OpenSSH key (force new file format) did the trick.
Now I have a new key file that can be used within the terminal using ssh-add
Additionally I had to set up a .bashrc for auto-starting the SSH agent upon starting the terminal (for the first time only):
export SSH_AUTH_SOCK=/tmp/.ssh-socket
ssh-add -l > /dev/null
if [ $? = 2 ]; then
rm -f $SSH_AUTH_SOCK
echo Starting new ssh-agent...
eval $(ssh-agent -a $SSH_AUTH_SOCK) > /dev/null
ssh-add ~/.ssh/privkey.ppk && echo "OK: ssh-agent set up successfully with the following keys:" && ssh-add -l
fi
Now my terminal is working correctly.
Best regards!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.