當執行 ssh-add 時

ssh-add ~/.ssh/<private_key_file>

如果出現錯誤訊息: Could not open a connection to your authentication agent.

執行進入 ssh bash ,就能正執行 ssh-add

ssh-agent bash

ssh-add ~/.ssh/<private_key_file>