gpt4 book ai didi

windows - 适用于 Windows 的 GIT Bash 没有给出任何结果并返回到命令提示符

转载 作者:可可西里 更新时间:2023-11-01 10:34:50 26 4
gpt4 key购买 nike

我是 Windows 上 GIT 的新用户。我在 Linux 上使用 GIT 有一段时间了,但出于某种原因,我需要在 Windows 上使用 GIT。现在我的问题是 GIT bash for windows 不执行任何远程操作并返回到没有消息的命令提示符。例如:git fetch、git pull、git remote show origin 等不会给你任何结果。它确实为我提供了本地操作的输出,例如 git log、git branch、git commit 等。

对于远程操作,GIT GUI 客户端也给出错误“命令失败”。

我试过多次重新安装它。我也尝试了以前版本的 GIT 2.5.3(最新版本是 2.6.0)。

有谁知道如何解决这个问题?

最佳答案

查看git remote -v的结果

如果没有定义远程,推送或获取将不知道去哪里查找。

您可以通过以下方式解决问题

git remote add origin /url/of/remote/repo

如果正常设置对您不起作用,请卸载,然后解压缩 PortableGit-2.6.1-64-bit.7z.exe任何你想要的地方,并将 C:\path\to\PortableGit-2.6.1-64-bit\bin 添加到 %PATH%

然后,从存储库根文件夹中,尝试 git ls-remote 以查看是否可以访问远程“origin”。

如果出现如下错误:

Faulting application name: git-remote-https.exe, version: 2.6.0.0, 
time stamp: 0x00000000
Faulting module name: LIBEAY32.dll, version: 1.0.2.4,
time stamp: 0x00000000

尝试并关注issue 133 comment .复制:

c:\winprg\git-sdk-64\mingw64\bin\ssleay32.dll
c:\winprg\git-sdk-64\mingw64\bin\libeay32.dll
to
c:\Windows\System32\

关于windows - 适用于 Windows 的 GIT Bash 没有给出任何结果并返回到命令提示符,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32968628/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com