github-share报错无法读取远程仓库

报错:github Could not read from remote repository

1.github创建仓库成功,而push报告此错误

2.考虑远程仓库名与本地项目名/文件夹名不匹配

3.修改以致匹配再次提交,成功.

错误排查阶段,重装了git,配置了github公钥,设置了本地访问github token,以及idea相关git的配置,顺路总结如下:

1.下载git, 地址: https://git-scm.com/downloads ,此处下载安装的是windows版本.

2.idea配置本地git所在路径,并测试版本信息,如下图:

3.安装,配置本地用户信息,name + email 

  打开 git.bash , 如下:

$ git config --global user.name "Your Name"
$ git config --global user.email "email@example.com"

3.生成本地公钥/私钥,直接三次回车,不推荐设置密码,将在本地用户文件夹下生成 .ssh文件夹,内有一个私钥 id_rsa 和一个公钥 id_rsa.pub

ssh-keygen -t rsa

4.github上配置ssh公钥

5.idea设置本地登陆github token

原文地址:https://www.cnblogs.com/nyatom/p/9415678.html