0.先將pycharm中Settings中的“Version Control” 中無效的Git刪除,並且點擊OK,確定刪除(如果沒有,則不需要刪除);
1.登錄到 “https://github.com/settings/tokens”,將原有的token清空,關閉pycharm,重啟pycharm,在pycharm上重新登錄github賬號;
2.點擊 在pycharm 中的 VCS 下 Import into Version Control 下的 Create Git Repository...;
3.在Create Git Repository 彈框中 選擇一個文件夾(可以是原有,也可以是新建),例如“pycharmrepository”,點擊“OK”,保存即可。