To allow git to use your SSH key, an SSH agent needs to be running on your device.
To check if it is already running, run the ps command. If the ssh-agent is already running, it should appear in the output, such as:
12
$ ps -ax | grep ssh-agent19998 ?? 0:00.20 /usr/bin/ssh-agent -l
To start the agent, run:
1
eval $(ssh-agent)
You may need to add this command to your ~/.bashrc, ~/.zshrc, ~/.profile, or equivalent shell configuration file. Adding this command to a shell configuration file will ensure the agent is running when you open a terminal.