简体   繁体   English

适用于 Windows 的 GIT Bash 没有结果并返回到命令提示符

[英]GIT Bash for windows gives no result and returns to command prompt

I'm a new user of GIT on windows.我是 Windows 上 GIT 的新用户。 I have been using GIT on linux for a while but for some reason, I need to use GIT on windows.我在 linux 上使用 GIT 已经有一段时间了,但出于某种原因,我需要在 Windows 上使用 GIT。 Now my problem is GIT bash for windows does not perform any remote operation and returns to command prompt with no msgs.现在我的问题是 Windows 的 GIT bash 不执行任何远程操作并返回到没有消息的命令提示符。 For eg: git fetch, git pull, git remote show origin, etc will give you no result.例如:git fetch、git pull、git remote show origin 等不会给你任何结果。 Where as it does give me output for local operations like git log, git branch, git commit, etc.它确实为我提供了诸如 git log、git branch、git commit 等本地操作的输出。

Also the GIT GUI Client gives error "Command Failed" for remote operations.此外,GIT GUI 客户端会为远程操作提供错误“命令失败”。

I tried re-installing it several times.我尝试重新安装它几次。 I tried a previous version 2.5.3 of GIT as well (latest version is 2.6.0).我也尝试了以前的 GIT 版本 2.5.3(最新版本是 2.6.0)。

Does anyone know how to solve this issue?有谁知道如何解决这个问题?

Check the result of git remote -v检查git remote -v的结果

If there is no remote defined, a push or fetch wouldn't know where to look.如果没有定义远程,推送或获取将不知道在哪里查找。

You can fix the issue with a您可以使用

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

If the normal setup doesn't work for you, uninstall, and then unzip PortableGit-2.6.1-64-bit.7z.exe anywhere you want, and add C:\\path\\to\\PortableGit-2.6.1-64-bit\\bin to %PATH% .如果正常设置对您不起作用,请卸载,然后将PortableGit-2.6.1-64-bit.7z.exe解压缩您想要的任何位置,并添加C:\\path\\to\\PortableGit-2.6.1-64-bit\\bin%PATH%

Then, from the repo root folder, try a git ls-remote to see if the remote ' origin ' is accessible.然后,从 repo 根文件夹中,尝试git ls-remote以查看远程“ origin ”是否可访问。

If there are errors like:如果出现如下错误:

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 

Try and follow issue 133 comment .尝试并关注第 133 期评论 Copy:复制:

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM