ssh could not open a connection to your authentication agent code example

Example 1: ssh-add could not open a connection to your authentication agent

# wsl2 solution with vscode to connect to Github repository (not sure why it works with the agent but not otherwise keys are in Ubuntu ie. could be with it being in a VM)
eval $(ssh-agent)
ssh-add

Example 2: ssh could not open a connection to your authentication agent

eval `ssh-agent -s`
ssh-add

Example 3: git bash Could not open a connection to your authentication agent. when adding ssh

ssh-agent bash
ssh-add

Tags:

Misc Example