Ошибка git is not installed

Now you can configure Visual Studio Code (version 0.10.2, check for older versions) to use an existing Git installation.

Just add the path to the Git executable in your Visual Studio Code settings (menu FilePreferencesSettings) like this:

{
    // Is Git enabled
    "git.enabled": true,

    // Path to the Git executable
    "git.path": "C:\\path\\to\\git.exe"

    // Other settings
}

Peter Mortensen's user avatar

answered Nov 26, 2015 at 21:00

Nikola Prokopić's user avatar

Nikola ProkopićNikola Prokopić

3,2763 gold badges17 silver badges20 bronze badges

11

Update 2020 (Mac)

I went through this $h!† again after updating to macOS v10.15 (Catalina), which requires an Xcode update.

And to clarify, while this post is about Visual Studio Code, this issue, is system wide. Your Git install is affected/hosed. You can try to run git in your terminal, Bash, Z shell (zsh), or whatever. It is now and it just won’t.

It is the same fix. Just update Xcode. Start it up and agree to the license. That’s it.


I hit this on Mac/OS X.

Symptoms:

  • You’ve been using Visual Studio Code for some time and have don’t have any issues with Git
  • You install Xcode (for whatever reason — OS update, etc.)
  • After installing Xcode, Visual Studio Code suddenly «can’t find Git and asks you to either install or set the Path in settings»

Quick fix:

Run Xcode (for the first time, after installing) and agree to license. That’s it.

How I stumbled upon this «fix»:

After going through numerous tips about checking git, e.g., which git and git --version, the latter actually offered clues with this Terminal message:

Agreeing to the Xcode/iOS license requires admin privileges, please run “sudo xcodebuild -license” and then retry this command.

As to why Xcode would even wrap it’s hands on git, WAT.

Peter Mortensen's user avatar

answered Dec 22, 2017 at 18:41

EdSF's user avatar

EdSFEdSF

11.8k6 gold badges42 silver badges83 bronze badges

13

Visual Studio Code simply looks in your PATH for git. Many UI clients ship with a «Portable Git» for simplicity, and do not add git to the path.

If you add your existing git client to your PATH (so that it can find git.exe), Visual Studio Code should enable Git source control management.

answered Apr 30, 2015 at 17:02

Edward Thomson's user avatar

Edward ThomsonEdward Thomson

75k14 gold badges158 silver badges187 bronze badges

12

I had this problem after upgrading to macOS v10.15 (Catalina).

The issue is resolved as follows:

1.

Find the Git location from the terminal:

which git

2.

Add the location of Git in settings file with your location:

settings.json

"git.path": "/usr/local/bin/git",

Depending on your platform, the user settings file (settings.json) is located here:

Windows %APPDATA%\Code\User\settings.json

macOS $HOME/Library/Application Support/Code/User/settings.json

Linux $HOME/.config/Code/User/settings.json

Peter Mortensen's user avatar

answered Mar 11, 2020 at 0:51

stayingcool's user avatar

stayingcoolstayingcool

2,3741 gold badge21 silver badges24 bronze badges

3

This can happen after upgrading macOS. Try running Git from a terminal and see if the error message begins with:

xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools) …

If so, the fix is to run:

xcode-select —install

from the terminal. See this answer for more details.

Peter Mortensen's user avatar

answered Feb 3, 2018 at 14:25

Just Another Justin's user avatar

1

In Visual Studio Code, open ‘User Settings’: Ctrl + P and type >sett. Press Enter.

This will open the default settings on the left side and User Settings on the right side.

Just add the path to git.exe in user settings:

"git.path": "C:\\Users\\[WINDOWS_USER]\\AppData\\Local\\Programs\\Git\\bin\\git.exe"

Replace [WINDOWS_USER] with your user name.

Restart Visual Studio Code.

Peter Mortensen's user avatar

answered Jan 5, 2016 at 9:41

Bartosh's user avatar

BartoshBartosh

4114 silver badges3 bronze badges

3

First check if Git* is installed or not in your system by typing the command in cmd /command prompt (in Windows):

where git

If you get an output like this,

λ where git
C:\cmder\vendor\git-for-windows\cmd\git.exe

Then Go to SettingsPreferencesSettings and put the bellow code** right part.

 {
    // If git enabled?
    "git.enabled": true,

    // Path to the Git executable
    "git.path": "C:\\cmder\\vendor\\git-for-windows\\cmd\\git.exe"
}
  • If you don’t have Git installed, install Git from https://git-scm.com/

** Just add a double slash (\\), just like the above code.

Peter Mortensen's user avatar

answered Apr 28, 2018 at 14:14

Rakesh Roy's user avatar

Rakesh RoyRakesh Roy

9402 gold badges12 silver badges23 bronze badges

1

Upgrade to macOS v13 (Ventura) < 13.0

As of November 2022

Upgrading to macOS v13 (Ventura) does not seem to affect your coding environments too much.

After upgrading to macOS v13, your Terminal and Visual Studio Code will give off a few errors. Such as:

It looks like Git is not installed on your system ..

or

can't find Git and asks you to either install or set the Path in settings

Some errors depend on your Z shell (zsh) setup or other customizations.

These common problems can be resolved by simply by reinstalling the Xcode command-line tools and updating Homebrew — since your terminal might be affected, reinstall from Apple’s executable https://developer.apple.com/download/all/
developer.apple.com. You will need to log in with your Apple ID.

Once installed, update Homebrew:

brew upgrade

Mac M1 — M2 machines likely have some native and ARM applications, so run:

arch -arm64 brew upgrade

Close all terminals and Visual Studio Code to restart!

Reopen Visual Studio Code, and the errors should be gone.

If Visual Studio Code is still looking for the Git path, you will need to add it manually.

Find the Git location and copy from the terminal:

which git

And add the path to the Git executable in your Visual Studio Code JSON settings file (menu FilePreferencesSettings) find and update the line. It should look similar to:

"git.path": "/usr/local/bin/git",

Peter Mortensen's user avatar

answered Nov 7, 2022 at 21:12

Jesper's user avatar

JesperJesper

1111 silver badge5 bronze badges

1

After an OS X update, I had to run xcode-select --install for GitLens to work.

Peter Mortensen's user avatar

answered Nov 22, 2018 at 11:29

Induja VJ's user avatar

Induja VJInduja VJ

811 silver badge2 bronze badges

1

I ran into the same problem after!

How did I fix it?

Step 1: Go to the Settings in Visual Studio Code.

Step 2: Open settings.json.

Step 3: You need to find something like «git.path» in settings.json

Step 4: just add the directory path where Git is installed in your system.

Example: «git.path»: «D:/Git/bin/git.exe»

Step 5: Restart your Visual Studio Code.

Peter Mortensen's user avatar

answered Mar 7, 2021 at 4:11

confused_'s user avatar

confused_confused_

1,1638 silver badges10 bronze badges

1

Run xcode-select --install. It’ll prompt you to install command line developer tools. Install the tools and restart your Visual Studio Code.

You’ll see Git working once again in Visual Studio Code.

Peter Mortensen's user avatar

answered Nov 5, 2021 at 6:00

kannappan's user avatar

kannappankannappan

2694 silver badges14 bronze badges

0

Visual Studio Code 1.50 (Sept 2020) adds an interesting alternative with issue 85734:

Support multiple values for the git.path setting

I use VSCode in three different places; my home computer, my work computer, and as a portable version I carry on a drive when I need to use a machine that doesn’t have it.

I use an extension to keep my settings synced up between editors, and the only issue I’ve encountered so far is that the git path doesn’t match between any of them.

  • On my home machine I have it installed to C of course,
  • work likes to be funny and install it on A,
  • and for the one on my drive I have a relative path set so that no matter what letter my drive gets, that VSCode can always find git.

I already attempted to use an array myself just to see if it’d work:

"git.path": ["C:\\Program Files\\Git\\bin\\git.exe", "A:\\Git\\bin\\git.exe", "..\\..\\Git\\bin\\git.exe"],

But VSCode reads it as one entire value.

What I’d like is for it to recognize it as an array and then try each path in order until it finds Git or runs out of paths.

This is addressed with PR 85954 and commit c334da1.


With Visual Studio Code 1.60+

  • "git.enabled": true
  • git.path

Peter Mortensen's user avatar

answered Sep 19, 2020 at 6:47

VonC's user avatar

VonCVonC

1.3m530 gold badges4426 silver badges5266 bronze badges

macOS — Visual Studio Code.

Step 1: Go to Visual Studio Code, menu FilePreferencesSettings (or Ctrl + ,).

Step 2: Type ‘Path’ in the search bar. You will get a result list that contains Git.

Step 3: Click on Git. After that, click on Edit in settings JSON file.

Step 4: In your Mac Terminal, type which git. You will get the Git path

Step 5: Just copy that path and add again the path key in the JSON file.

Peter Mortensen's user avatar

answered Mar 27 at 12:20

utkal patel's user avatar

utkal patelutkal patel

1,3211 gold badge15 silver badges24 bronze badges

1

I faced this problem on macOS v10.13.5 (High Sierra) after upgrading Xcode.

When I run the git command, I received the below message:

Agreeing to the Xcode/iOS license requires admin privileges, please run “sudo xcodebuild -license” and then retry this command.

After running the sudo xcodebuild -license command, the below message appears:

You have not agreed to the Xcode license agreements. You must agree to both license agreements below in order to use Xcode.

Hit the Enter key to view the license agreements at ‘/Applications/Xcode.app/Contents/Resources/English.lproj/License.rtf’

Typing the Enter key to open the license agreements and typing the space key to review details of it, until the below message appears:

By typing ‘agree’ you are agreeing to the terms of the software license agreements. Type ‘print’ to print them or anything else to cancel, [agree, print, cancel]

The final step is simply typing agree to sign with the license agreement.


After typing the git command, we can check that Visual Studio Code detected Git again.

Peter Mortensen's user avatar

answered Jun 20, 2018 at 1:42

Pengyy's user avatar

PengyyPengyy

37.4k15 gold badges83 silver badges73 bronze badges

I have recently started with Visual Studio Code. I have this issue and just writing the exact path of the Git executable solves
the issue. Here is the code:

«git.path»: «C:\Program Files\Git\bin\git.exe»,

Peter Mortensen's user avatar

answered May 3, 2018 at 6:02

Ajmal Aamir's user avatar

Ajmal AamirAjmal Aamir

1,0858 silver badges8 bronze badges

1

If you have multiple environments. You could include Git Path in the Visual Studio Code Workspace Setting. For Windows, depending on your setting, you could hit Ctrl + P, search for «settings». Open settings.json (or menu FilePreferencesSettings). Navigate to Workspace Settings. Find «Path» and add paths to Git bin and cmd folders.

Enter image description here

Enter image description here

Enter image description here

Enter image description here

Environments can have their own paths. I discovered this when I echoed my PC %PATH% on cmd. Git bin and cmd path where available, but when I was working on my project, echoed %PATH% did not have git and cmd folder. Adding them, as shown above, solved the issue.

Extra Notes:

On cmd, you can echo «%PATH%» and see if git bin and cmd folders are included. If not, you could concatenate using SETX PATH on, for example,

SETX PATH "%PATH%;Path_to_Git_bin;Path_to_Gt_cmd;"

This will make git available on local, root but not in some environments which comes with their own paths (SETX /M PATH "%PATH%;Path_to_Git_bin;Path_to_Gt_cmd;" would have though).

In case you have a long Path that is chopped off due to Path length (getting «Error: Truncated at X characters.» message), you can increase the path length in RegEdit.

  • In «Search Windows», search for «regedit». Right-click to open as Administrator.
  • Go to Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem
  • Right-click and modify. Change value data from 0 to 1

This will increase your path length. If it is already one, then I am not sure how to proceed from there :).

[Enter image description here9

Enter image description here

Peter Mortensen's user avatar

answered Dec 16, 2017 at 5:58

Prayson W. Daniel's user avatar

Three years later, I ran into the same issue. Setting the path in user settings & PATH environment variable didn’t help. I updated Visual Studio Code and that solved it.

Peter Mortensen's user avatar

answered Apr 8, 2018 at 9:12

hgolov's user avatar

hgolovhgolov

6501 gold badge11 silver badges28 bronze badges

Version control

First install Git onto your desktop, and then add the encircled extension in Visual Studio Code, as seen in the picture.

That helped me fix the same issue you have.

Peter Mortensen's user avatar

answered Jan 22, 2019 at 10:03

Jason Mwenyo's user avatar

Open

C:\Users\nassim\AppData\Roaming\Code\User\settings.json

Comment any Git line there:

// ...
// "git-graph.integratedTerminalShell": "E:\\Apps\\Git\\bin\\bash.exe",
// "git.path": ""
//...

And add git.exe to the OS path.

Note for me: Fixing this Git error also fixed the npm error too. Since they are both defined in the path, if one fail, the remaining will fail as well.

Peter Mortensen's user avatar

answered May 6, 2020 at 14:49

Nassim's user avatar

NassimNassim

2,8792 gold badges37 silver badges39 bronze badges

In my case, Git was installed on my Windows 10 OS and there was an entry in PATH variable. But Visual Studio Code 1.52.1 still is unable to detect it from a terminal window, but it was available in a CMD console.

The problem was solved by switching the terminal from PowerShell to CMD or shell, and a Visual Studio Code restart.

Peter Mortensen's user avatar

answered Jan 17, 2021 at 11:40

aleha_84's user avatar

aleha_84aleha_84

8,3292 gold badges38 silver badges47 bronze badges

  1. Make sure Git is enabled (menu FilePreferencesGit Enabled) as other have mentioned.
  2. Make sure Git is installed and in the PATH (with the correct location, by default: C:\Program Files\Git\cmd) — PATH in System Variables, BTW
  3. Change the default terminal. PowerShell can be a bit funny, and I recommend Git Bash, but cmd is fine. This can be done by selecting the terminal dropdown and selecting ‘set default shell’ and then creating a new terminal with the + button.
  4. Restart Visual Studio Code, and sometimes reboot if that fails.

Peter Mortensen's user avatar

answered Nov 24, 2020 at 22:33

Theo's user avatar

TheoTheo

458 bronze badges

1

I solved the same problem on macOS with an M1 Pro processor by installing the GitLens Visual Code extension. The changed files were displayed after enabling the extension. Then I turned to reloading Visual Studio Code and there were no changes, but once I ran

git status

in the terminal, it showed all the files, and all changes were tracked.

Peter Mortensen's user avatar

answered Dec 9, 2021 at 13:26

emir's user avatar

emiremir

1,3361 gold badge14 silver badges33 bronze badges

The only way I could get to work in my Windows 8.1 is the following:

Add to system environment variables (not user variables):

C:\Users\USERNAME\AppData\Local\GitHub\PortableGit_YOURVERSION\bin;C:\Users\USERNAME\AppData\Local\GitHub\PortableGit_YOURVERSION\libexec\git-core;C:\Users\USERNAME\AppData\Local\GitHub\PortableGit_YOURVERSION\cmd\

This fixed the «it looks like Git is not installed on your system» error on my Visual Studio Code.

Peter Mortensen's user avatar

answered May 22, 2015 at 18:39

Marcio's user avatar

I faced this issue after updating macOS!

I installed Git again using Homebrew, and it worked!

brew install git

Peter Mortensen's user avatar

answered Sep 15, 2022 at 10:46

cmcodes's user avatar

cmcodescmcodes

1,56919 silver badges24 bronze badges

I edited Path into System Environment and add «C:\Program Files\Git\bin» then restart Vscode. It’s worked for me. I don’t understand why I am using it normally then I have this problem. Maybe during the installation of something it causes that problem.

answered Mar 14, 2022 at 8:54

Nam Lee's user avatar

Nam LeeNam Lee

9091 gold badge9 silver badges21 bronze badges

I found that I had git: false in settings.json and changed it to true. It works now.

Peter Mortensen's user avatar

answered Jun 22, 2019 at 6:10

kaidoj's user avatar

kaidojkaidoj

3531 gold badge4 silver badges5 bronze badges

Here’s what worked for me. Instead of using the Visual Studio Code terminal to run your Git commands, run the Git commands from a cmd terminal at the path of your application.

Peter Mortensen's user avatar

answered Jan 10, 2020 at 6:03

dizad87's user avatar

dizad87dizad87

4484 silver badges15 bronze badges

For a Linux-based OS: I had such an issue due to a corrupted path, but I was able to temporarily fix the issue and my Git installation was immediately restored.

In case you’re facing such path issue type the command below

export PATH="/usr/bin:/bin:$PATH"

Peter Mortensen's user avatar

answered Jun 29, 2020 at 17:14

stanley mbote's user avatar

stanley mbotestanley mbote

9561 gold badge7 silver badges17 bronze badges

aldtimofeev

Сам гит интсталлировал. Bower установил и глобально и локально.

Нашёл инструкцию тут как менять пути какие-то (https://stackoverflow.com/questions/20666989/bower… ), но что-то не уверен стоит ли там что-то менять.


  • Вопрос задан

  • 5868 просмотров

Там галочка по умолчанию стоит, как я понял, но немного по-другому называется.

Просто я не через git заходил, а через обычную командную строку.

Пригласить эксперта

Если у вас нет git и git bash, то скачайте его с официального сайта git-scm.com

Если вы пользователь windows, не забудьте во время установки перевести radio button в положение «Run Git from the Windows Command Prompt». Таким образом, git автоматически будет добавлен в ваш PATH, что в будущем сэкономит вам силы и сбережет ваши нервы.

Добавить нужную папку в PATH вручную.
В Windows 8.1 это через «Панель управления» (или ПКМ на кнопке «Пуск») — «Система» — «Дополнительные параметры системы» — вкладка «Дополнительно» (активна по умолчанию) — «Переменные среды…» (кнопка внизу) в список Path добавляем

;%PROGRAMFILES(x86)%\Git\bin;%PROGRAMFILES(x86)%\Git\cmd

и перезагрузить компьютер.
Так что правильную вы инструкцию нашли)

set PATH=%PATH%;C:\Program Files\Git\bin;


  • Показать ещё
    Загружается…

22 сент. 2023, в 14:16

500 руб./за проект

22 сент. 2023, в 13:48

300000 руб./за проект

22 сент. 2023, в 13:33

60000 руб./за проект

Минуточку внимания

На чтение 4 мин Опубликовано Обновлено

Pycharm – это одна из самых популярных интегрированных сред разработки (IDE), которая широко используется программистами для написания кода на языке Python. Она предоставляет множество полезных функций и инструментов, включая поддержку системы контроля версий Git.

Однако, при использовании Pycharm иногда может возникнуть проблема с установкой Git. Это может произойти по разным причинам, например, если вы не установили Git на свой компьютер или не указали правильный путь к нему в настройках Pycharm.

Если вы столкнулись с проблемой «Pycharm git is not installed», не волнуйтесь — существуют несколько способов решить эту проблему. В этой статье мы рассмотрим несколько из них и покажем, как установить Git в Pycharm и настроить его для работы.

Функциональность Pycharm для работы с Git

Pycharm является одной из самых популярных интегрированных сред разработки для языка Python. Одной из важных функций, предоставляемых Pycharm, является поддержка работы с системой контроля версий Git. Работать с Git в Pycharm можно как через графический интерфейс, так и используя команды в терминале.

  1. Установка Git
  2. Перед началом работы с Git в Pycharm, необходимо убедиться, что Git установлен на компьютере. Для этого можно воспользоваться командой git —version в терминале или установить Git с официального сайта https://git-scm.com/downloads.

  3. Интеграция Git в Pycharm
  4. Pycharm предоставляет удобный инструментарий для работы с Git. Чтобы начать использовать его, необходимо настроить Git в настройках Pycharm. Для этого нужно открыть раздел «Settings» из меню «File» и перейти во вкладку «Version Control». Затем выбрать «Git» и указать путь к исполняемому файлу Git. Обычно он находится в папке «C:\Program Files\Git\bin\git.exe» на Windows и «/usr/bin/git» на Linux и Mac.

  5. Создание репозитория
  6. После успешной интеграции Git в Pycharm можно начинать работу с репозиториями. Pycharm позволяет создавать новые репозитории или клонировать существующие. Для создания нового репозитория нужно выбрать «Create New Repository» из меню «VCS» и указать путь к папке проекта.

  7. Управление изменениями
  8. Pycharm предоставляет удобные инструменты для управления изменениями в репозитории Git. В Pycharm можно просматривать статус изменений, делать коммиты, переключаться между ветками, сливать и разрешать конфликты. Для этого в Pycharm есть отдельные панели и меню, а также интеграция с терминалом.

  9. Совместная работа
  10. Pycharm также предоставляет инструменты для совместной работы в Git. С помощью фичи «Code Review» можно просматривать и комментировать изменения в коде, а также запускать тесты и проверять качество кода. Кроме того, Pycharm поддерживает работу с удаленными репозиториями, позволяя пушить и пуллить изменения, создавать ветки и выполнять другие действия в удаленном репозитории.

Использование функциональности Pycharm для работы с Git значительно упрощает процесс контроля версий и совместной работы в проектах на языке Python. Благодаря интеграции Git в Pycharm, разработчикам становится гораздо удобнее отслеживать изменения, совместно работать над кодом и управлять различными ветками и репозиториями.

Проблема «Pycharm git is not installed»

Одна из распространенных проблем, возникающих при работе с Pycharm, связана с отсутствием установленного Git. Git является системой контроля версий и используется многими разработчиками для управления и отслеживания изменений в исходном коде проекта.

Если при запуске Pycharm вы сталкиваетесь с ошибкой «Pycharm git is not installed» (Git не установлен), это значит, что Pycharm не может обнаружить Git на вашем компьютере.

Чтобы решить эту проблему, вам необходимо выполнить следующие шаги:

  1. Установите Git на свой компьютер. Git можно скачать с официального сайта Git: https://git-scm.com/downloads. При установке следуйте инструкциям и выберите нужные опции настройки.
  2. После установки Git перезапустите Pycharm.
  3. Зайдите в настройки Pycharm, выбрав пункт «File» в верхнем меню, затем выберите «Settings».
  4. В окне настроек выберите раздел «Version Control» и убедитесь, что Git отображается в списке установленных систем контроля версий.
  5. Если Git не отображается в списке, проверьте путь к установленному Git. Вы можете указать путь вручную, выбрав «Configure» и указав путь к исполняемому файлу git.exe.
  6. После указания пути к Git нажмите «Apply» и «OK», чтобы сохранить настройки.

Теперь вам должно быть доступно использование Git в Pycharm. Если проблема не решена, вам может потребоваться перезагрузить компьютер и повторить все шаги снова. Если проблема повторяется, обратитесь к документации Pycharm или к сообществу разработчиков для получения дополнительной помощи.

@mcornella — using the Dockerfile I’ve posted above, you’ll be able replicate my exact environment. The error occurs during docker build. To really narrow down the variables, you can even merely use this file to reproduce the error:

FROM node:8.9.4-alpine

RUN apk add --update zsh curl git

ENV INSTALL_URL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh

# just proving git is installed, since the installer will complain that it's not
RUN git --version

# install oh-my-zsh (removed the "|| true" so that this error kills container build
RUN curl -fsSL ${INSTALL_URL} | zsh

In case you’re new to Docker, simply install it on your system and then:

  1. create a file called Dockerfile, pasting the content above as its contents;
  2. open a terminal and cd over the dir in which you’d created the aforementioned Dockerfile; and
  3. run the command docker build -t oh-my-zh-install-failure .

You’ll see output such as the following:

Sending build context to Docker daemon  2.048kB
Step 1/5 : FROM node:8.9.4-alpine
 ---> 406f227b21f5
Step 2/5 : RUN apk add --update zsh curl git
 ---> Using cache
 ---> 1fb936a9bda0
Step 3/5 : ENV INSTALL_URL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh
 ---> Using cache
 ---> 1e90136a6e33
Step 4/5 : RUN git --version
 ---> Running in 8ec1c0c80f97
git version 2.13.5
Removing intermediate container 8ec1c0c80f97
 ---> d921f42dfc15
Step 5/5 : RUN curl -fsSL ${INSTALL_URL} | zsh
 ---> Running in c1a4013fbe9d
Cloning Oh My Zsh...
Error: git is not installed
The command '/bin/sh -c curl -fsSL ${INSTALL_URL} | zsh' returned a non-zero code: 1

Again, as reported above, the problem seems to be traced back to the output of hash (which seems to defy the expectations of the installer).

Windows, when I try to run npm install, it shows:

[email protected] postinstall E:\mean
node node_modules/grunt-cli/bin/grunt install
Running "bower:install" (bower) task

Fatal error : git is not installed or not in the PATH
npm ERR! weird error 1
npm ERR! not ok code 0

What is the problem? How to fix it?

The project git repository is https://github.com/linnovate/mean

This question is related to
windows
node.js
npm
mean-stack

The answer is


Did you install Git correctly?

According to the Bower site, you need to make sure you check the option «Run Git from Windows Command Prompt».

I had this issue where Git was not found when I was trying to install Angular. I re-ran the installer for git and changed my setting and then it worked.

enter image description here

From the bower site:
http://bower.io/


while @vitocorleone is technically correct. If you have already installed, there is no need to reinstall. You just need to add it to your path. You will find yourself doing this for many of the tools for the mean stack so you should get used to doing it. You don’t want to have to be in the folder that holds the executable to run it.

  • Control Panel —> System and Security —> System
  • click on Advanced System Settings on the left.
  • make sure you are on the advanced tab
  • click the Environment Variables button on the bottom
  • under system variables on the bottom find the Path variable
  • at the end of the line type (assuming this is where you installed it)

    ;C:\Program Files (x86)\git\cmd

  • click ok, ok, and ok to save

This essentially tells the OS.. if you don’t find this executable in the folder I am typing in, look in Path to fide where it is.


Installing git and running npm install from git-bash worked for me. Make sure you are in the correct directory.


Install git and tortoise git for windows and make sure it is on your path, (the installer for Tortoise Git includes options for the command line tools and ensuring that it is on the path — select them).

You will need to close and re-open any existing command line sessions for the changes to take effect.

Then you should be able to run npm install successfully or move on to the next problem!


In my case the issue was not resolved because i did not restart my system. Please make sure you do restart your system.


If you installed GitHubDesktop then the path for git.exe will be ,

C:\Users\<‘Username’>\AppData\Local\GitHubDesktop\app-1.1.1\resources\app\git\cmd

Add this path to the environment variables by following,

** (Note: \cmd at the end, not \cmd\git.exe).**

Navigate to the Environmental Variables Editor and find the Path variable in the “System Variables” section. Click Edit… and paste the URL of Git to the end. Save!

Now open a new cmd and type command git. If you are able to see the git usage then it’s done.

Now you can execute your command to install your package.

ex: npm install native-base —save


I did install git and tried again and got the same error. But running ‘npm install’ in a new command prompt window worked for me. Restarting the machine is not required.


Go to Environmental Variables you will find this in Computer Properties->Advance system Setting->Environmental Variables -> Path

Add the path of your git installed int the system.
eg: «C:\Program Files\Git\cmd«

Save it.
Good to go now!!


Use Git CMD instead of using Win CMD.


Questions with windows tag:

«Permission Denied» trying to run Python on Windows 10
A fatal error occurred while creating a TLS client credential. The internal error state is 10013
How to install OpenJDK 11 on Windows?
I can’t install pyaudio on Windows? How to solve «error: Microsoft Visual C++ 14.0 is required.»?
git clone: Authentication failed for <URL>
How to avoid the «Windows Defender SmartScreen prevented an unrecognized app from starting warning»
XCOPY: Overwrite all without prompt in BATCH
Laravel 5 show ErrorException file_put_contents failed to open stream: No such file or directory
how to open Jupyter notebook in chrome on windows
Tensorflow import error: No module named ‘tensorflow’
git clone error: RPC failed; curl 56 OpenSSL SSL_read: SSL_ERROR_SYSCALL, errno 10054
bash: npm: command not found?
Anaconda Installed but Cannot Launch Navigator
AttributeError: module ‘cv2.cv2’ has no attribute ‘createLBPHFaceRecognizer’
How to install pandas from pip on windows cmd?
‘ls’ in CMD on Windows is not recognized
Copy Files from Windows to the Ubuntu Subsystem
Tensorflow r1.0 : could not a find a version that satisfies the requirement tensorflow
Kill tomcat service running on any port, Windows
python pip on Windows — command ‘cl.exe’ failed
How to install pip3 on Windows?
Mount current directory as a volume in Docker on Windows 10
Specifying Font and Size in HTML table
Why Local Users and Groups is missing in Computer Management on Windows 10 Home?
Command to run a .bat file
How do I force Robocopy to overwrite files?
Windows- Pyinstaller Error «failed to execute script » When App Clicked
How to completely uninstall Android Studio from windows(v10)?
Docker for Windows error: «Hardware assisted virtualization and data execution protection must be enabled in the BIOS»
How do I kill the process currently using a port on localhost in Windows?
Error : getaddrinfo ENOTFOUND registry.npmjs.org registry.npmjs.org:443
How to add a custom CA Root certificate to the CA Store used by pip in Windows?
How to reset the use/password of jenkins on windows?
npm ERR! Error: EPERM: operation not permitted, rename
CMD (command prompt) can’t go to the desktop
Xampp-mysql — «Table doesn’t exist in engine» #1932
Change drive in git bash for windows
«OverflowError: Python int too large to convert to C long» on windows but not mac
Visual studio code terminal, how to run a command with administrator rights?
ImportError: cannot import name NUMPY_MKL
Pip — Fatal error in launcher: Unable to create process using ‘»‘
Installing tensorflow with anaconda in windows
Where does Anaconda Python install on Windows?
PermissionError: [Errno 13] Permission denied
How to restart a windows service using Task Scheduler
How to install xgboost in Anaconda Python (Windows platform)?
NPM stuck giving the same error EISDIR: Illegal operation on a directory, read at error (native)
Can’t access 127.0.0.1
anaconda — path environment variable in windows
Global npm install location on windows?

Questions with node.js tag:

Hide Signs that Meteor.js was Used
Querying date field in MongoDB with Mongoose
SyntaxError: Cannot use import statement outside a module
Server Discovery And Monitoring engine is deprecated
How to fix ReferenceError: primordials is not defined in node
UnhandledPromiseRejectionWarning: This error originated either by throwing inside of an async function without a catch block
dyld: Library not loaded: /usr/local/opt/icu4c/lib/libicui18n.62.dylib error running php after installing node with brew on Mac
internal/modules/cjs/loader.js:582 throw err
DeprecationWarning: Buffer() is deprecated due to security and usability issues when I move my script to another server
Please run `npm cache clean`
jwt check if token expired
Using Environment Variables with Vue.js
Avoid «current URL string parser is deprecated» warning by setting useNewUrlParser to true
Can not find module “@angular-devkit/build-angular”
MongoNetworkError: failed to connect to server [localhost:27017] on first connect [MongoNetworkError: connect ECONNREFUSED 127.0.0.1:27017]
MySQL 8.0 — Client does not support authentication protocol requested by server; consider upgrading MySQL client
npx command not found
await is only valid in async function
What could cause an error related to npm not being able to find a file? No contents in my node_modules subfolder. Why is that?
How to set bot’s status
Returning data from Axios API
Error: EACCES: permission denied, access ‘/usr/local/lib/node_modules’
ReferenceError: fetch is not defined
ERROR in Cannot find module ‘node-sass’
Test process.env with Jest
‘react-scripts’ is not recognized as an internal or external command
NPM Install Error:Unexpected end of JSON input while parsing near ‘…nt-webpack-plugin»:»0’
db.collection is not a function when using MongoClient v3.0
When I run `npm install`, it returns with `ERR! code EINTEGRITY` (npm 5.3.0)
E: Unable to locate package npm
How can the default node version be set using NVM?
How to downgrade Node version
How to solve npm install throwing fsevents warning on non-MAC OS?
How to read file with async/await properly?
Angular: Cannot Get /
The difference between «require(x)» and «import x»
Is there a way to force npm to generate package-lock.json?
Angular — ng: command not found
MongoError: connect ECONNREFUSED 127.0.0.1:27017
How can I use async/await at the top level?
ERROR in ./node_modules/css-loader?
Downgrade npm to an older version
Node — was compiled against a different Node.js version using NODE_MODULE_VERSION 51
npm install Error: rollbackFailedOptional
npm ERR! code UNABLE_TO_GET_ISSUER_CERT_LOCALLY
How can I use an ES6 import in Node.js?
Node.js: Python not found exception due to node-sass and node-gyp
bash: npm: command not found?
npm WARN enoent ENOENT: no such file or directory, open ‘C:\Users\Nuwanst\package.json’
Laravel 5.4 ‘cross-env’ Is Not Recognized as an Internal or External Command

Questions with npm tag:

What does ‘x packages are looking for funding’ mean when running `npm install`?
error: This is probably not a problem with npm. There is likely additional logging output above
Module not found: Error: Can’t resolve ‘core-js/es6’
Browserslist: caniuse-lite is outdated. Please run next command `npm update caniuse-lite browserslist`
ERROR in The Angular Compiler requires TypeScript >=3.1.1 and <3.2.0 but 3.2.1 was found instead
DeprecationWarning: Buffer() is deprecated due to security and usability issues when I move my script to another server
Please run `npm cache clean`
What exactly is the ‘react-scripts start’ command?
On npm install: Unhandled rejection Error: EACCES: permission denied
Difference between npx and npm?
Local package.json exists, but node_modules missing
npx command not found
What could cause an error related to npm not being able to find a file? No contents in my node_modules subfolder. Why is that?
SSL_connect: SSL_ERROR_SYSCALL in connection to github.com:443
Error: EACCES: permission denied, access ‘/usr/local/lib/node_modules’
ERROR in Cannot find module ‘node-sass’
NPM Install Error:Unexpected end of JSON input while parsing near ‘…nt-webpack-plugin»:»0’
When I run `npm install`, it returns with `ERR! code EINTEGRITY` (npm 5.3.0)
E: Unable to locate package npm
Is there a way to force npm to generate package-lock.json?
ERROR in ./node_modules/css-loader?
Downgrade npm to an older version
Node — was compiled against a different Node.js version using NODE_MODULE_VERSION 51
npm WARN … requires a peer of … but none is installed. You must install peer dependencies yourself
Error: EPERM: operation not permitted, unlink ‘D:\Sources\**\node_modules\fsevents\node_modules\abbrev\package.json’
npm install Error: rollbackFailedOptional
webpack: Module not found: Error: Can’t resolve (with relative path)
npm ERR! code UNABLE_TO_GET_ISSUER_CERT_LOCALLY
npm WARN enoent ENOENT: no such file or directory, open ‘C:\Users\Nuwanst\package.json’
Laravel 5.4 ‘cross-env’ Is Not Recognized as an Internal or External Command
Why does «npm install» rewrite package-lock.json?
The term ‘ng’ is not recognized as the name of a cmdlet
Npm Error — No matching version found for
What is the role of the package-lock.json?
Do I commit the package-lock.json file created by npm 5?
What is the difference between npm install and npm run build?
How to resolve Nodejs: Error: ENOENT: no such file or directory
Node update a specific package
Cannot uninstall angular-cli
Field ‘browser’ doesn’t contain a valid alias configuration
How can I add a .npmrc file?
How to solve npm error «npm ERR! code ELIFECYCLE»
You seem to not be depending on «@angular/core». This is an error
Why is «npm install» really slow?
Checking version of angular-cli that’s installed?
How to specify a port to run a create-react-app based project?
Maximum call stack size exceeded on npm install
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]
How to clear cache in Yarn?
How to update TypeScript to latest version with npm?

Questions with mean-stack tag:

Npm install cannot find module ‘semver’
Difference between MEAN.js and MEAN.io
Error: [ng:areq] from angular controller
git is not installed or not in the PATH

Понравилась статья? Поделить с друзьями:
  • Ошибка f04 на газовом котле висман
  • Ошибка itunes 0x80090326
  • Ошибка git commit
  • Ошибка ip2 на котле аристон
  • Ошибка f04 на газовом котле балтгаз