You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
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@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:
Could not open a connection to your authentication agent.
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):
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
Now my terminal is working correctly.