Windows的GIT Bash没有结果,并返回到命令提示符 [英] GIT Bash for windows gives no result and returns to command prompt

查看:435
本文介绍了Windows的GIT Bash没有结果,并返回到命令提示符的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

I'm a new user of GIT on windows. I have been using GIT on linux for a while but for some reason, I need to use GIT on windows. Now my problem is GIT bash for windows does not perform any remote operation and returns to command prompt with no msgs. For eg: git fetch, git pull, git remote show origin, etc will give you no result. Where as it does give me output for local operations like git log, git branch, git commit, etc.

GIT GUI客户端还为远程操作提供了错误命令失败".

Also the GIT GUI Client gives error "Command Failed" for remote operations.

我尝试重新安装几次.我还尝试了GIT的先前版本2.5.3(最新版本为2.6.0).

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).

有人知道如何解决此问题吗?

Does anyone know how to solve this issue?

推荐答案

检查git remote -v

如果没有定义远程,则推送或提取将不知道在哪里查找.

If there is no remote defined, a push or fetch wouldn't know where to look.

您可以使用

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%.

然后,从repo根文件夹中,尝试git ls-remote以查看是否可以访问远程"origin".

Then, from the repo root folder, try a git ls-remote to see if the remote 'origin' is accessible.

如果出现以下错误:

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 

尝试并遵循问题133条评论.复制:

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

这篇关于Windows的GIT Bash没有结果,并返回到命令提示符的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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