在路径环境变量- Windows中找不到Git

时间:2022-12-14 23:19:11

I'm running windows 8 and ran the setup for the Git credential helper found here: http://blob.andrewnurse.net/gitcredentialwinstore/git-credential-winstore.exe

我正在运行windows 8,并为在这里找到的Git凭据助手运行设置:http://blob.andrewnurse.net/gitcredentialwinstore/git- credentialwinstore.exe。

When it runs, in the console window that pops up, I get "Could not find Git in your PATH environment variable. You can specify the exact path to git by running git-credential-winstore -i C:\Path\To\Git.exe"

当它运行时,在弹出的控制台窗口中,我得到“在路径环境变量中找不到Git”。您可以通过运行git- certificate -winstore -i:\ path \ to \ git .exe”来指定git的确切路径。

I guess I do not know enough about windows here to understand what I should do here. Ok WHERE do I type this git-credential-winstore -i C:\Path\To\Git.exe, in the GitBash console?

我想我对这里的窗户了解得还不够,不知道该怎么做。好的,我在哪里输入这个Git凭证winstore - C:\Path\到\Git。exe,在GitBash控制台?

The path to my Git.exe appears to be C:\Program Files (x86)\Git\cmd

去我的Git的路径。exe似乎C:\Program Files (x86)\Git\cmd

Also note that when I installed Git from http://git-scm.com/downloads for windows, I chose the option "Use Git Bash Only" as I'm not really familiar with any of this stuff period.

还要注意,当我从http://git-scm.com/downloads为windows安装Git时,我选择了“只使用Git Bash”选项,因为我对这段时间并不熟悉。

UPDATE - more details

更新——更多的细节

I am referencing this blog post: http://www.jeremymorgan.com/tutorials/how-to-install-octopress-windows/

我正在引用这篇博文:http://www.jeremymorgan.com/tutorials/howto -install- octopus -windows/

So the problem is even after I tried the command "Yari 1.9.3" in the command prompt for windows, or in powershell, neither worked:

所以问题是,即使我在windows的命令提示符或powershell中尝试了“Yari 1.9.3”命令之后,这两个命令都没有工作:

在路径环境变量- Windows中找不到Git

在路径环境变量- Windows中找不到Git

4 个解决方案

#1


9  

you cd into your download directory or wherever you saved git-credential-winstore.exe to:

您将cd保存到您的下载目录或保存git凭证winstore的任何地方。exe:

C:\Users\user\Downloads>

then run

然后运行

 git-credential-winstore -i "C:\Program Files (x86)\Git\bin\git.exe"

your windows command line will look like this:

您的windows命令行将如下所示:

C:\Users\user\Downloads>git-credential-winstore -i "C:\Program Files (x86)\Git\bin\git.exe"

note the quote marks.

注意引号。

This worked for me.

这为我工作。

#2


0  

You run commands like this from a shell

您可以从shell中运行这样的命令

With Windows the defacto shell is cmd.exe, also known as Command Prompt.

与Windows事实上的壳是cmd。exe,也称为命令提示符。

This "program" can typically be found at C:\Windows\System32\cmd.exe

这个“程序”通常可以在C:\Windows\System32\cmd.exe找到

Your instructions likely omit this information because cmd.exe has been around for 20 years.

由于cmd,您的指令可能会忽略这些信息。exe已经存在了20年。

#3


0  

You can only install path under uninstall registry key.
some snippet batch script.

只能在卸载注册表项下安装路径。一些片段批处理脚本。

@ECHO OFF

SET __PA=

IF /i NOT "%PROCESSOR_ARCHITECTURE%"=="x86" SET __PA=\Wow6432Node
FOR /F "tokens=2*" %%F in ('REG QUERY HKLM\SOFTWARE%__PA%\Microsoft\Windows\CurrentVersion\Uninstall\Git_is1 /v InstallLocation') DO SET gitPath=%%G

ECHO %gitPath%

#4


0  

Because the git you have installed is not in the Program Files or Program Files(x86).

因为您安装的git不在程序文件或程序文件(x86)中。

It have been installed as a localized version for the particular user and thus your Environment Variable path should be like this. C:\Users\\AppData\Local\Programs\Git\bin

它已被安装为特定用户的本地化版本,因此您的环境变量路径应该是这样的。Git当地C:\Users\ \ AppData \ \程序\ \ bin

Cheers ;)

干杯,)

#1


9  

you cd into your download directory or wherever you saved git-credential-winstore.exe to:

您将cd保存到您的下载目录或保存git凭证winstore的任何地方。exe:

C:\Users\user\Downloads>

then run

然后运行

 git-credential-winstore -i "C:\Program Files (x86)\Git\bin\git.exe"

your windows command line will look like this:

您的windows命令行将如下所示:

C:\Users\user\Downloads>git-credential-winstore -i "C:\Program Files (x86)\Git\bin\git.exe"

note the quote marks.

注意引号。

This worked for me.

这为我工作。

#2


0  

You run commands like this from a shell

您可以从shell中运行这样的命令

With Windows the defacto shell is cmd.exe, also known as Command Prompt.

与Windows事实上的壳是cmd。exe,也称为命令提示符。

This "program" can typically be found at C:\Windows\System32\cmd.exe

这个“程序”通常可以在C:\Windows\System32\cmd.exe找到

Your instructions likely omit this information because cmd.exe has been around for 20 years.

由于cmd,您的指令可能会忽略这些信息。exe已经存在了20年。

#3


0  

You can only install path under uninstall registry key.
some snippet batch script.

只能在卸载注册表项下安装路径。一些片段批处理脚本。

@ECHO OFF

SET __PA=

IF /i NOT "%PROCESSOR_ARCHITECTURE%"=="x86" SET __PA=\Wow6432Node
FOR /F "tokens=2*" %%F in ('REG QUERY HKLM\SOFTWARE%__PA%\Microsoft\Windows\CurrentVersion\Uninstall\Git_is1 /v InstallLocation') DO SET gitPath=%%G

ECHO %gitPath%

#4


0  

Because the git you have installed is not in the Program Files or Program Files(x86).

因为您安装的git不在程序文件或程序文件(x86)中。

It have been installed as a localized version for the particular user and thus your Environment Variable path should be like this. C:\Users\\AppData\Local\Programs\Git\bin

它已被安装为特定用户的本地化版本,因此您的环境变量路径应该是这样的。Git当地C:\Users\ \ AppData \ \程序\ \ bin

Cheers ;)

干杯,)