致命:无法读取未配置的'https//github.com'设备的用户名 [英] Fatal: could not read username for 'https //github.com' device not configured

查看:29
本文介绍了致命:无法读取未配置的'https//github.com'设备的用户名的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用SublimeGit插件将代码推送到GitHub,但我遇到了一些奇怪的事情。

推送到https://github.com/username/username.github.io.git

致命:无法读取‘https://github.com’的用户名:设备未配置

在询问之前进行了大量搜索,如fatal: could not read Username for 'https://github.com': No such file or directoryFatal: could not read Username for 'https://github.com': No such device or address

但问题仍然存在,我们将感谢您所做的任何努力。

推荐答案

fatal: could not read Username for 'https://github.com': Device not configuredgit需要请求用户名或密码,并且(A)它唯一可用的机制是在控制台上请求,并且(B)没有可用的控制台(GIT没有连接到TTY设备,即您没有以交互方式运行)时,您会收到错误(fatal: could not read Username for 'https://github.com': Device not configured)。

在您从某种GUI工具调用git并且尚未配置适当的凭据帮助器的环境中,通常会发生这种情况。

解决此问题的方法有多种:

  • 最简单的方法之一是使用ssh身份验证,而不是https

  • 您可以将GitHub的凭据硬编码到本地Git存储库中,如gitcredentials文档中所述。

  • 您可以配置适当的帮助器应用程序。可能已经配置了一个,但git可能根本找不到它。gitcredentials手册页也包含有关此选项的信息。

这篇关于致命:无法读取未配置的'https//github.com'设备的用户名的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆