Windows10 下 github ssh 访问出现 Permission denied(publickey)错误的解决方法

Windows10 下 github ssh 访问出现 Permission denied(publickey)错误的解决方法。

  • 错误信息:

    git clone [email protected]:ediwang/envsetup.git
    Cloning into 'envsetup'...
    [email protected]: Permission denied (publickey).
    fatal: Could not read from remote repository.
    
    Please make sure you have the correct access rights
    and the repository exists.
  • 解决方法:

    • 打开 services.msc , 找到 OpenSSH Authentication Agent 服 务,然后启用它。

    • 进入 .ssh 目录

    • 执行 ssh-agent -s

    • 执行 ssh-add id_rsa (id_rsa 要换成自己的)

    • 执行 ssh -T [email protected],如果出现:
      Hi molisiye! You've successfully authenticated, but GitHub does not provide shell access. 就说明可以通过 ssh 访问 github 了

猜你喜欢

转载自www.cnblogs.com/molisiye/p/10796173.html
今日推荐