GitHub Desktop 推送报错

报错类型1

GitHub Desktop 安装、登录Github、配置SSH、修改内容提交推送,但报错如下:

fatal: could not read Username for 'https://github.com': No such file or directory

原因可能为git bash版本问题

解决方法1

在项目文档内,右键 Git Bash Here,执行指令后即可正常推送

git remote set-url origin git@github.com:SouthBegonia/UnityWorld.git

注意: git@github.com:SouthBegonia/UnityWorld.git 是你自己项目的SSH地址

解决方法2

在GitHub Desktop内,Repository->Repository Settings,设定Primary remote repository为自己项目的SSH地址

报错类型2

原因可能是ssh问题

解决方法

参考 GitHub Desktop报错 Authentication failed. Some common reasons include - Youse的二分口粮地 这篇末尾的步骤

(PS:最简单暴力就SSH删了重新生成和配置)

原文地址:https://www.cnblogs.com/SouthBegonia/p/15643607.html