Can't install Cordova plugins from Git on CLI

寵の児 提交于 2019-12-02 18:47:14
slaadvak

It seems there is a bug in git source dependencies on Windows.

Try to create the directory manually :

mkdir C:\Users\DAVIDH~1\AppData\Local\Temp\plugman\git

Then :

git clone https://github.com/danwilson/google-analytics-plugin.git

From there : https://github.com/sbt/sbt/issues/895

EDIT

I removed the numerical extension, which is not needed, to follow the remark from FugueWeb

UPDATE (From Sept 2014)

As noted in Daren Beale's answer and also in the issue linked above, this bug is fixed in Git 1.9.4. Downloading the latest version of GIT for Windows should get around this problem.

I had this exact issue on my desktop but not on my laptop, as suggested above it look like a Git issue. Installing the latest version of Git on my desktop (1.9.4) fixed the problem.

I was experiencing a similar issue while issuing the commands from cygwin, cygwin's temp folder structure is a bit different

Manually creating the parent folders (plugman and git), which doesn't exist, fixes the issue (the numbered folders can be created under the plugman/git folders later on)

On my machine the issue was, that git wasn't available in the cmd in windows. Open cmd and type "git" and press enter. If there is shown, that the command is not available, then you might have the same issue.

Solution:

Find out where your git.exe is located. For me it was a custom path in "D:\Program Files\Git\bin". Then search in windows for "environment variables" and open the link to the shown windows settings.

Find the entry "Path" and click on "edit". Add the path to the git.exe file (without "git.exe"). Restart cmd and type "git".

If that was the only issue the installation of cordova plugins over git should work.

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