【问题标题】:git push with git-cola failinggit-cola 的 git push 失败
【发布时间】:2014-07-20 21:22:09
【问题描述】:

一周前,我在使用 git-cola 推送时开始收到以下错误...我发现几年前发生了很多类似的问题,但它根本没有帮助。

"git push" returned exit status 128

Have you rebased/pulled lately?

Already up-to-date.

Pushing to https://github.com/slacktracer/lokapala.git
error: cannot run None: No such file or directory
fatal: could not read Username for 'https://github.com': No such device or address

当我使用终端推送时,它工作得很好,所以也许这主要是关于 git-cola 的问题。无论如何,只是想知道是否有人可以提供帮助。我现在迷路了……

【问题讨论】:

  • “我发现了一些关于几年前发生的类似问题的事情,但它根本没有帮助。”您是指有关 Stack Overflow 的另一个问题吗? 哪个问题?
  • @Cupcake 我没有指任何特定的stackoverflow问题。但是 VonC 链接的问题也提到了它:stackoverflow.com/questions/20871549/…

标签: git github git-cola


【解决方案1】:
cannot run None: No such file or directory

这意味着您用于提交消息的编辑器未正确设置。
检查git config core.editor的值

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

检查,in this answer,如果您没有使用 msysgit 1.8.5(在 Windows 上):更新的版本没有这个错误。

查看您的配置是否声明了user.nameuser.email

如果 https 访问一直失败,请尝试switching to ssh

但是对于 https,你也可以创建一个OAut token

git config remote.origin.url https://{token}@github.com/username/project.git
git config remote.origin.url https://{token}@github.com/slacktracer/lokapala.git
# or
git remote set-url origin https://{token}@github.com/slacktracer/lokapala.git

OP slacktracer 确认 in the comments 问题似乎仅限于 lunbuntu 上的 git-cola。

  • 使用 git-gui 可能是一种解决方法。
  • 从命令行输入 git push 可以在任何 GUI 中直接切换回来。

issue 179 可以提供帮助,以及通过以下方式启动 git cola

GIT_COLA_TRACE=1 git cola

【讨论】:

  • 嘿,谢谢。我在 lubuntu,所以我不能遇到 msysgit 问题,对吧?我仍然可以从终端推送,只是为了测试而安装了 git-gui。似乎 git-cola 不再询问用户名和密码...(推到 github,我的意思是)
  • @slacktracer 你的意思是你现在可以推送到 GitHub 了吗? git-cola 现在可能已经缓存了您的凭据。
  • 不!我仍然无法用 git-cola 推动。它不起作用。给我上述错误。广告它不会提示我输入用户名和密码。 git-gui,我刚刚安装它,确实如此。它确实有效。我可以用它推动。因为我可以从终端推送。
  • 我通常的工作流程是使用 git-cola 推送到 github。如果不能让它像以前那样工作,我将开始使用 git-gui。我敢肯定它可能会更糟... =)
  • @slacktracer 或者您可以从命令行输入 git push,然后再切换回 git-cola 或 git-gui。
【解决方案2】:

我遇到了同样的问题,只是清除了配置文件,对我来说,重新安装就可以了。 '-'

 # apt-get purge git-cola 

编辑:事实上,安装 git-gui 确实为我解决了这个问题。

【讨论】:

    猜你喜欢
    • 2021-03-15
    • 2013-03-21
    • 2014-04-30
    • 2011-04-26
    • 1970-01-01
    • 2023-03-04
    • 2015-07-17
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多