【将Pycharm项目提交到Github中,出现Can‘t connect to repository from configured remote】

1.前言

工作过程中,我们会经常用到 Git 以及 github 对代码进行版本管理,新手还是会碰到很多问题,今天说一个将本地代码上传时碰到的问题。


2.问题

将 Pycharm 项目提交到 Github 中出现

Can’t connect to repository from configured remote


3.解决方法

  1. 打开pycharm,菜单栏找到 VCS => Git =>Remotes
    【将Pycharm项目提交到Github中,出现Can‘t connect to repository from configured remote】

  2. 这里会有一个或多个Remote,点击该 - 标记,删除所有remotes
    【将Pycharm项目提交到Github中,出现Can‘t connect to repository from configured remote】

  3. 现在github的所有 remotes 已被删除,再次尝试在github上导入项目,这次肯定会成功。