【博主已解决】gitee码云push报错:[email protected]: Permission denied (publickey). fatal: Could not read from remote

第一次用gitee和git,一直在报错,改了一整天的错误,终于好了。
到最后一步push的时候报错了,最终用以下方法解决。
【博主已解决】gitee码云push报错:[email protected]: Permission denied (publickey). fatal: Could not read from remote

  1. $ ssh-****** -t rsa -C “[email protected]
    后面改成你的gitee注册或绑定的邮箱。
    会有要你输入文件位置和两次密码,不用输入,直接回车回车回车就行。
    【博主已解决】gitee码云push报错:[email protected]: Permission denied (publickey). fatal: Could not read from remote
  2. $ ssh-agent -s
    【博主已解决】gitee码云push报错:[email protected]: Permission denied (publickey). fatal: Could not read from remote
  3. 把ssh**添加到码云
    打开C盘–>用户–>你的用户名–>找到.ssh文件夹。找到id_rsa.pub(日过有多个用最新的那个),用记事本打开,复制整个文本粘贴到gitee(点头像,进入gitee设置面板,SSH设置,将复制的文本粘贴到公钥,标题会自动生成,然后点击添加,根据提示输入密码就可以了。)

【博主已解决】gitee码云push报错:[email protected]: Permission denied (publickey). fatal: Could not read from remote
【博主已解决】gitee码云push报错:[email protected]: Permission denied (publickey). fatal: Could not read from remote
【博主已解决】gitee码云push报错:[email protected]: Permission denied (publickey). fatal: Could not read from remote
4. $ ssh -T [email protected]
【!!!用码云的姐妹们这里一定是gitee.com不是github.com!!!因为找的教程大多这一句是ssh -T [email protected]就不出现本应该出现的hi,xxx那一句!!!!】
【博主已解决】gitee码云push报错:[email protected]: Permission denied (publickey). fatal: Could not read from remote
5. 然后再push就OK啦!解决!
【博主已解决】gitee码云push报错:[email protected]: Permission denied (publickey). fatal: Could not read from remote