致命:无法读取“https://github.com"的用户名:没有这样的文件或目录 [英] fatal: could not read Username for 'https://github.com': No such file or directory
本文介绍了致命:无法读取“https://github.com"的用户名:没有这样的文件或目录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
当我尝试在 Windows 上使用 git Bash 提取代码时遇到以下问题:
I have the following problem when I try to pull code using git Bash on Windows:
fatal: could not read Username for 'https://github.com': No such file or directory
我已经尝试实施此处提供的公认解决方案:
I already tried to implement the accepted solution provided here:
...但问题仍然存在.添加/删除原点后,我仍然遇到相同的错误.
...but the problem persists. After adding/removing origin I still get the same error.
推荐答案
按照此处的步骤设置 SSH 密钥:https://help.github.com/articles/generate-ssh-keys
Follow the steps to setup SSH keys here: https://help.github.com/articles/generating-ssh-keys
或
git remote add origin https://{username}:{password}@github.com/{username}/project.git
更新:如果您得到致命:远程源已经存在.",那么您必须使用 set-url:
Update: If you get "fatal: remote origin already exists." then you have to use set-url:
git remote set-url origin https://{username}:{password}@github.com/{username}/project.git
这篇关于致命:无法读取“https://github.com"的用户名:没有这样的文件或目录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文