給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.