初次提交代码到gitee时ssh时报错
[username:~/]git push -u origin master
Warning: Permanently added 'gitee.com,180.97.125.228' (ECDSA) to the list of known hosts.
sign_and_send_pubkey: signing failed: agent refused operation
Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
2 运行ssh-add 操作成功
运行ssh-add命令,将专用密钥添加到ssh-agent的高速缓存中
[username:~/]ssh-add
Identity added: /home/alice/.ssh/id_rsa (/home/alice/.ssh/id_rsa)
在执行,就没有报错了
[username:~/]ssh -T git@gitee.com
Warning: Permanently added 'gitee.com,180.97.125.228' (ECDSA) to the list of known hosts.
Hi ! You've successfully authenticated, but GITEE.COM does not provide shell access.