Problem Running Git in Win Command Prompt

4,883 views
Skip to first unread message

Augustus Loi

unread,
Jul 5, 2011, 1:20:57 AM7/5/11
to RailsInstaller
I can't seem to get the git commands to work in win command prompt as
demo'd.

When I type git init, I get the following:

'chcp' is not recognized as an internal or external command, operable
program or batch file, etc.

Anyone else getting this error?

I'm running Win 7.

Luis Lavena

unread,
Jul 5, 2011, 2:57:10 PM7/5/11
to railsin...@googlegroups.com
On Tue, Jul 5, 2011 at 2:20 AM, Augustus Loi <m...@augustusloi.com> wrote:
> I can't seem to get the git commands to work in win command prompt as
> demo'd.
>
> When I type git init, I get the following:
>
> 'chcp' is not recognized as an internal or external command, operable
> program or batch file, etc.
>

chcp is located inside Windows, Git changes the chcp to a latin-based
one to be able to properly display accents.

Can you tell me what are the value of PATH variable?

Run this on the command prompt: SET PATH

Also, if you start a normal command prompt, can you access to chcp?

Type "chcp" or "where chcp" and tell us what it outputs.

Also, what version of Windows 7 and under which locale/regional configuration?

--
Luis Lavena
AREA 17
-
Perfection in design is achieved not when there is nothing more to add,
but rather when there is nothing more to take away.
Antoine de Saint-Exupéry

Augustus Loi

unread,
Jul 5, 2011, 7:32:38 PM7/5/11
to RailsInstaller
set path

PATH=C:\Program Files\Java\jdk1.6.0_25\bin;C:\Program Files (x86)\Git
\cmd;C:\Git\cmd;C:\RailsInstaller\Git\cmd;C:\RailsInstaller
\Ruby1.8.7\bin
PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC;.RB;.RBW

chcp

'chcp' is not recognized as an internal or external command, operable
program or batch file

where chcp

'where' is not recognized as an internal or external command,
operable
program or batch file

I'm on Win 7 Home Premium on Singapore, English (Singapore)

Luis Lavena

unread,
Jul 5, 2011, 8:24:08 PM7/5/11
to railsin...@googlegroups.com
On Tue, Jul 5, 2011 at 8:32 PM, Augustus Loi <m...@augustusloi.com> wrote:
> set path
>
> PATH=C:\Program Files\Java\jdk1.6.0_25\bin;C:\Program Files (x86)\Git
> \cmd;C:\Git\cmd;C:\RailsInstaller\Git\cmd;C:\RailsInstaller
> \Ruby1.8.7\bin
> PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC;.RB;.RBW
>

You have multiple installations of Git, one inside Program Files and
other in C:\Git

Also seems none of Windows directories are in the PATH, which could
have been a side effect of one of the installations that corrupted
your PATH.

Please go to Computer, Right click on in, and select Properties. Then
select Advanced system settings and then click "Environment Variables"
button.

Under System variables, you should have something like this:

Path: %SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\

(You need to double click to see this)

If you don't have that, that means your system variables got corrupted
by something you installed. Please add it again using the above value
and restart your system.

chcp, where and other tools are available in the system folders, which
seems to be out of your configuration.

Reply all
Reply to author
Forward
Message has been deleted
0 new messages