Please make sure you have the correct access rights and the repository exists.

  1. git config --global user.name “yourname”
  2. git config --global user.email“xxxxxxxxx.com"
  3. 除.ssh文件夹(直接搜索该文件夹)下的known_hosts(手动删除即可,不需要git)
  4. $ ssh-keygen -t rsa -C "[email protected]"(请填你设置的邮箱地址)
  5. 出现:

Generating public/private rsa key pair.

Enter file in which to save the key (/Users/your_user_directory/.ssh/id_rsa):

  1. 连续回车
  2. 然后系统会自动在.ssh文件夹下生成两个文件,id_rsa和id_rsa.pub,打开id_rsa.pub,全部的内容复制
  3. 打开https://github.com/,添加ssh
  4. ssh -T [email protected]
  5. yes
  6. 关闭窗口,重新操作
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章