git clone 遇到的问题

经常遇到这个问题, 所以今天决定把它记录下来

当使用git clone时,会报Please make sure you have the correct access rights and the repository exists.这个,解决方法:

1. git config --global user.name "登录名"

2. git config --global user.email "邮箱"

3. 在.ssh文件夹中删除known_hosts

4.执行 ssh-keygen -t rsa -C "邮箱" 命令 会出现

Generating public/private rsa key pair.

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

按enter

5. 在github上配置ssh就可以解决啦

原文地址:https://www.cnblogs.com/renxiao1218/p/9796160.html