当我尝试在 Windows 上使用 git Bash pull 代码时遇到以下问题:
fatal: could not read Username for 'https://github.com': No such file or directory
我已经尝试实现此处提供的公认解决方案:
但是问题依然存在。
添加/删除 origin 后,我仍然遇到相同的错误。
可以就这个问题提出建议吗?
谢谢!
最佳答案
按照此处的步骤设置 SSH key :https://help.github.com/articles/generating-ssh-keys
或
git remote add origin https://{username}:{password}@github.com/{username}/project.git
更新:如果您得到“fatal: remote origin already exists.”,那么您必须使用 set-url:
git remote set-url origin https://{username}:{password}@github.com/{username}/project.git
关于GitHub - 致命 : could not read Username for 'https://github.com' : No such file or directory,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22147574/