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

Posted sandea

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了fatal: could not read Username for 'https://github.com': No such file or directo相关的知识,希望对你有一定的参考价值。

Git push origin master报错

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

 

 

原因使用https方式的时候 在git remote add origin 的https url 里面没有用户名和密码

 

 

修改为如下:

git remote add origin https://{username}:{password}@github.com/{username}/project.git

https://github.com/kemayo/sublime-text-git/issues/176

或者直接修改 .git/config 隐藏文件 为git remote add origin https://{username}:{password}@github.com/{username}/project.git 格式

 

例子:https://sandea_98:123***@github.com/sandea/test.git 

以上是关于fatal: could not read Username for 'https://github.com': No such file or directo的主要内容,如果未能解决你的问题,请参考以下文章

Push failed: Failed with error: fatal: Could not read from remote repository

Permission denied (publickey). fatal: Could not read from remote repository.

fatal: Authentication failed could not read from remote repository

fatal: Authentication failed could not read from remote repository

fatal:'origin' does not appear to be a git repository fatal:Could not read from remote repos

fatal: Could not read from remote repository.的解决办法