给github添加key

  • 登陆github后,点击右上角头像,下拉菜单选择Setting
  • 左边菜单选择”SSH and GPG keys”
  • 点击绿色按钮,”New SSH key”
  • 在本机terminal生成ssh key
  • 把public key添加到github上
  • 在本机ssh-add <private key>
    • 如果遇到“Could not open a connection to your authentication agent“可以运行 eval "$(ssh-agent -s)"

Leave a Comment

Your email address will not be published.