github不再使用密码验证

陈小盈 2023-02-12

remote: Support for password authentication was removed on August 13, 2021.

remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.

  1. 创建SSH key
    1
    2
    3
    ## -t 指定密钥类型
    ## -C 设置注释文字
    ssh-keygen -t rsa -C "ccyinging"
  2. 查看公钥
    1
    cat ~/.ssh/id_rsa.pub
  3. 将公钥复制到github上