git-gui - askpass:没有这样的文件或目录 [英] git-gui--askpass: No such file or directory

查看:1347
本文介绍了git-gui - askpass:没有这样的文件或目录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在终端运行以下命令:
git config --global core.askpassgit-gui-askpass

现在,我得到这个错误消息,每当我尝试推送到github:
错误:不能运行git-gui - askpass:没有这样的文件或目录
它显示两次,一次在电子邮件提示符之前,然后另一个在密码提示之前。



我可以成功推送,但错误消息仍显示出来。
如何阻止这个错误出现?



预先感谢您阅读/帮助:)
$ b $ (注意:我经过几次失败的尝试才将一个新的 rails项目推送到github上,而这个命令却一直运行着,而且我绝望了,于是我搜索了一下stackoverflow和某人这里建议运行这个命令,我不知道它是什么,我只是运行它,因为我认为它可以工作;它仍然不能用于推动新项目;只推动我目前在github上的项目,但错误仍然显示)

解决方案

我解决了这个问题。

(下面的长解释仅适用于像我这样的noobs)



事实证明,运行此命令=>git config --global core.askpass git-gui --askpass,我们最终创建了一个全局设置(解释--global部分),这实际上写入了.gitconfig,它是一个实际的文件你的主目录(我在我的虚拟机中使用ubuntu)。该文件本身是隐藏的,所以打CRTL + h看到它。打开它,如果你像我一样运行上面的命令,你可能会在.gitconfig中看到这个:
$ b [core]

  askpass = git-gui  -  askpass 

该文件可以按照您的预期进行编辑。删除该行,当我尝试推送github时,我原始文章中提到的错误不会再出现在终端中。


I ran the following command in terminal: git config --global core.askpass "git-gui--askpass"

Now, I get this error message whenever I attempt to push to github: "error: cannot run git-gui--askpass: No such file or directory" It shows up twice, once prior to the email prompt, then another prior to the password prompt.

I can successfully push, but the error message still shows up. How do I stop this error from showing up?

Thank you in advance for reading/helping :)

(Note: I ran the command only after several failed attempts to push a new rails project to github; the push kept hanging on me and I got desperate. So I searched around stackoverflow and someone here suggested running that command. I didn't know what it was, I just ran it because I thought it would work; it still doesn't work for pushing the new project; pushing only works for the projects I currently have on github, but the error still shows)

解决方案

I solved the issue.

(the long explanation below is only for noobs like me)

It turns out, when running this command => "git config --global core.askpass git-gui--askpass", we end up creating a global setting (explains the --global part), and this is actually written into .gitconfig, which is an actual file found in your home directory (I'm using ubuntu in my virtual machine). the file itself is hidden, so hit CRTL + h to see it. open it, and if you ran the command above like me, you'll likely see this in .gitconfig:

[core]

    askpass = git-gui--askpass

the file is editable as you might expect. delete that line and the "error" i mentioned in my original post will not appear in the terminal anymore when you attempt a push to github.

这篇关于git-gui - askpass:没有这样的文件或目录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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