Software Archive
Read-only legacy content
17061 Discussions

Can't add any plugin

wu_c_
Beginner
1,143 Views

Hi ,

When I want to add plugin, I meet this unknown error:

Command failed: /Applications/Intel XDK.app/Contents/MacOS/git/bin/git --exec-path=/Applications/Intel XDK.app/Contents/MacOS/git/libexec/git-core -c init.templatedir=/Applications/Intel XDK.app/Contents/MacOS/git/share/git-core/templates clone https://github.com/cranberrygame/cordova-plugin-ad-admobsdk /var/folders/2q/vzmbsrfj40xd3pd765__02kh0000gn/T/git/1447330099541 --single-branch --depth=1 Cloning into '/var/folders/2q/vzmbsrfj40xd3pd765__02kh0000gn/T/git/1447330099541'... error: Could not expand include path '~/.gitcinclude' fatal: bad config file line 49 in /usr/local/git/etc/gitconfig

 

I google a lot found nothing but this post in last month:

https://software.intel.com/zh-cn/forums/intel-xdk/topic/596353

I tried to quit xdk or upgrade my git or using a blank project or install newest xdk.  All is not good. 

Please have a help if you know it. Thanks a lot.

 

 

0 Kudos
1 Solution
Kevin_P_1
Beginner
1,142 Views

I had the same problem and fixed it by editing my /usr/local/git/etc/gitconfig and manually expanding the user directory ~ to have the fixed path instead (to my own profile).

$ sudo nano /usr/local/git/etc/gifconfig

There's two things in the config file to edit....

 Under the [core] heading :

   excludesfile = ~/.gitignore     
change to....
   excludesfile = /Users/kevin/.gitignore

and under [include] change :

   path = ~/.gitcinclude
change to...

  path = /Users/kevin/.gitcinclude

(change "kevin" to your user profile name ;)

Obviously, this will lock git to one user profile, so it's not ideal, but it fixed the issue for me and I only have one profile on my Mac which is used for git.  There's obviously a bug somewhere with either git or XDK which is causing this. It happened to me when importing an older project into XDK.

Hope it helps someone :D

View solution in original post

0 Kudos
10 Replies
Elroy_A_Intel
Employee
1,143 Views

If you adding the above mentioned plugin in your project, you can do the following:

For the CLI4 supported version of the Cranberry AdMob plugin, add the plugin's id (com.cranberrygame.phonegap.plugin.ad.admob) to the Plugin ID field within the Cordova Plugin Explorer on the Projects panel.

Note: The Plugin Source should be set to Cordova plugin registry.

For the CLI5 supported version of the Cranberry AdMob plugin, add the plugin's id (cordova-plugin-ad-admob) to the Plugin ID field within the Cordova Plugin Explorer on the Projects panel.

0 Kudos
PaulF_IntelCorp
Employee
1,143 Views

There's a problem with your system's gitconfig file. See the very last message in the errors:

error: Could not expand include path '~/.gitcinclude' fatal: bad config file line 49 in /usr/local/git/etc/gitconfig

Check line 49 of your /usr/local/git/etc/gitconfig file on your Mac, something is not correct about the contents of the file. I cannot tell you what is wrong, only that this is what git is complaining about and this is what's causing the failure. Elroy's suggestion will likely fix your immediate issue, but if you do not fix this git problem you are going to eventually run into this problem again.

0 Kudos
wu_c_
Beginner
1,143 Views

Paul F. (Intel) wrote:

There's a problem with your system's gitconfig file. See the very last message in the errors:

error: Could not expand include path '~/.gitcinclude' fatal: bad config file line 49 in /usr/local/git/etc/gitconfig

Check line 49 of your /usr/local/git/etc/gitconfig file on your Mac, something is not correct about the contents of the file. I cannot tell you what is wrong, only that this is what git is complaining about and this is what's causing the failure. Elroy's suggestion will likely fix your immediate issue, but if you do not fix this git problem you are going to eventually run into this problem again.

Thanks for fast reply.

I would  paste my this gitconfig file:

I google a lot  and not found what is wrong. I also tried to comment this line , then I get another strange error:

 

My git always work well and just now I tried to git clone something and git push .... . It works well.

So what is the problem here? 

 

 

0 Kudos
wu_c_
Beginner
1,143 Views

Elroy Ashtian Jr (Intel) wrote:

If you adding the above mentioned plugin in your project, you can do the following:

For the CLI4 supported version of the Cranberry AdMob plugin, add the plugin's id (com.cranberrygame.phonegap.plugin.ad.admob) to the Plugin ID field within the Cordova Plugin Explorer on the Projects panel.

Note: The Plugin Source should be set to Cordova plugin registry.

For the CLI5 supported version of the Cranberry AdMob plugin, add the plugin's id (cordova-plugin-ad-admob) to the Plugin ID field within the Cordova Plugin Explorer on the Projects panel.

 

They are the same error with my first post.  Very strange here.

0 Kudos
wu_c_
Beginner
1,143 Views

Do this a bug in new version ? My version is 2673. 

0 Kudos
PaulF_IntelCorp
Employee
1,143 Views

This may be an incompatibility with the version of git that's being used by the XDK (it includes it's own git) and your global git file. You can force the XDK to use your installed git, rather than the version that came with it. The line that was the problem in the previous error is actually line 48 in your screen shot, not line 49.

To use the git on your system, goto the gear icon in the upper right of the XDK and choose the git panel. On that panel you can specify the location of the git that you are using on your system that works. Here's an image of that configuration panel:

Screen Shot 2015-11-12 at 5.31.31 PM.png

 

0 Kudos
wu_c_
Beginner
1,143 Views

Still not work.

I doing following:
which git - >/usr/local/bin/git

Then I pasted in the custom git path(save it). Still show the same error. Restart XDK, it is same error.

 

 

Paul F. (Intel) wrote:

This may be an incompatibility with the version of git that's being used by the XDK (it includes it's own git) and your global git file. You can force the XDK to use your installed git, rather than the version that came with it. The line that was the problem in the previous error is actually line 48 in your screen shot, not line 49.

To use the git on your system, goto the gear icon in the upper right of the XDK and choose the git panel. On that panel you can specify the location of the git that you are using on your system that works. Here's an image of that configuration panel:

 

0 Kudos
PaulF_IntelCorp
Employee
1,143 Views

@wu -- in the second error it's complaining about your ~/.gitconfig file. A simple thing to do would be to rename that file, temporarily. For example:

$ cd
$ mv .gitconfig .gitconfig.org

Then retry to see if that makes any difference. At least that would help to identify if the .gitconfig file is the problem. From there, you'll have to figure out what inside the .gitconfig file is causing the problem. The error message looks similar to the first error message, but doesn't provide as much useful information.
 

0 Kudos
Kevin_P_1
Beginner
1,143 Views

I had the same problem and fixed it by editing my /usr/local/git/etc/gitconfig and manually expanding the user directory ~ to have the fixed path instead (to my own profile).

$ sudo nano /usr/local/git/etc/gifconfig

There's two things in the config file to edit....

 Under the [core] heading :

   excludesfile = ~/.gitignore     
change to....
   excludesfile = /Users/kevin/.gitignore

and under [include] change :

   path = ~/.gitcinclude
change to...

  path = /Users/kevin/.gitcinclude

(change "kevin" to your user profile name ;)

Obviously, this will lock git to one user profile, so it's not ideal, but it fixed the issue for me and I only have one profile on my Mac which is used for git.  There's obviously a bug somewhere with either git or XDK which is causing this. It happened to me when importing an older project into XDK.

Hope it helps someone :D

0 Kudos
Steve_N_1
Beginner
1,143 Views

Exit the SDK and then delete the gitconfig file. Re-open intel XDK and try installing your plugin again and it should work. That seemed to do the trick for me (On mac OSX).

0 Kudos
Reply