【问题标题】:GIT Bash for windows gives no result and returns to command prompt用于 Windows 的 GIT Bash 没有结果并返回到命令提示符
【发布时间】:2016-01-03 07:00:11
【问题描述】:

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

GIT GUI 客户端也为远程操作提供错误“命令失败”。

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

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

【问题讨论】:

    标签: windows git github git-bash git-gui


    【解决方案1】:

    查看git remote -v的结果

    如果没有定义远程,push 或 fetch 将不知道在哪里查找。

    你可以用一个来解决这个问题

    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%

    然后,从 repo 根文件夹,尝试 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\
    

    【讨论】:

    • git remote -v 给出正确的 url。 :(
    • 好主意 ;) 让我们现在等待 OP 的反馈。
    • @VinayKumarTiwary 是 https 网址还是 ssh 网址?
    • @VonC 我尝试了您建议的步骤。不幸的是,这也行不通。每次我尝试远程操作时,应用程序都会崩溃。我在事件查看器中查看了详细的错误并发现了这一点。错误应用程序名称:git-remote-https.exe,版本:2.6.0.0,时间戳:0x00000000 错误模块名称:LIBEAY32.dll,版本:1.0.2.4,时间戳:0x00000000
    猜你喜欢
    • 2015-06-18
    • 2015-05-18
    • 1970-01-01
    • 2021-08-19
    • 2019-10-15
    • 2012-09-29
    • 1970-01-01
    • 1970-01-01
    • 2015-09-12
    相关资源
    最近更新 更多