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

≯℡__Kan透↙ 提交于 2019-12-07 15:58:52

问题


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.

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

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?


回答1:


Check the result of 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%.

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

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. Copy:

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


来源:https://stackoverflow.com/questions/32968628/git-bash-for-windows-gives-no-result-and-returns-to-command-prompt

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!