GitHub - 致命 : could not read Username for 'https://github.com' : No such file or directory

标签 git github git-pull git-bash

当我尝试在 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/

相关文章:

git - 为什么在 Visual Studio Code 中执行 git pull 后我有未提交的更改?

linux - git pull 支持继续下载吗?

Git:分支什么时候 merge 到 master 中的?

windows - 尝试在 Windows 上使用 svn2git 时出错

git - 维护派生的git仓库的工作流程是什么?

heroku - 如何将多个github帐户链接到一个heroku帐户?

git - 在 VSO 或 VS2015 中创建 Git 分支标签

tags - 如何使用github标签为项目创建下载?

git - 如何使 Drupal 与 GitHub 存储库保持同步?

GIT 下载 pull 请求文件已更改