github如何配置ssh

1.问题:

Warning: Permanently added 'github.com' (RSA) to the list of known hosts.
git@github.com: Permission denied (publickey).
fatal: Could not read from remote repository.

2.解析

没有SSHkey 需要使用git生成一个

  • 使用git
    右键 点击git bash here
    image

  • 进入后执行

ssh-keygen -t rsa -C "邮箱号@qq.com"
  • 一直回车即可
    image

  • Your public key has been saved in /c/Users/LENOVO/.ssh/id_rsa.pub
    这里告诉了你.ssh存放路径,找到 id_rsa.pub文件打开————>复制

  • 到github中添加新的SSH

    • 找到设置
      image

    image
    image

posted @ 2021-07-02 20:04  .爬行的蜗牛  阅读(197)  评论(0编辑  收藏  举报
Document