Full details in this answer.
In summary, when ssh-add -l
returns “The agent has no identities”, it means that keys used by ssh
(stored in files such as ~/.ssh/id_rsa
, ~/.ssh/id_dsa
, etc.) are either missing, they are not known to ssh-agent
, which is the authentication agent, or that their permissions are set incorrectly (for example, world writable).
If your keys are missing or if you have not generated any, use ssh-keygen -t rsa
, then ssh-add
to add them.
If keys exist but are not known to ssh-agent
(like if they are in a non-standard folder), use ssh-add /path/to/my-non-standard-ssh-folder/id_rsa
to add them.
See this answer if you are having trouble with ssh-add
or ssh-agent
.