Git binary in command line
It would be very useful if git could be usable from command line to enable package restoring and other useful nodeJS stuff.
Discussions are closed to public comments.
If you need help with AppHarbor please
start a new discussion.
Keyboard shortcuts
Generic
? | Show this help |
---|---|
ESC | Blurs the current field |
Comment Form
r | Focus the comment reply box |
---|---|
^ + ↩ | Submit the comment |
You can use Command ⌘
instead of Control ^
on Mac
Support Staff 1 Posted by rune on 13 Jul, 2014 09:16 PM
Hi,
We're working on a new feature that'll allow better control of the build process. This will also allow you to include for instance git for package restore when you run your builds.
For now though, it might be a reasonable stop-gap to just include the git executable in your repository so you can use it during the build. Have you tried doing that?
Best,
Rune
2 Posted by XVincentX on 14 Jul, 2014 06:37 AM
Yes I did, as you can see from the repository (from with appharbor build are run)
https://github.com/XVincentX/NodeVStudio
Look at packages.json (git bin redirect) and tools folder. But looks like not working anyway
Support Staff 3 Posted by rune on 14 Jul, 2014 08:10 AM
Alright, actually git has been installed on the build servers in the meantime, so perhaps you want to give it another shot. Let me know how it works out.
Best,
Rune
4 Posted by XVincentX on 14 Jul, 2014 08:20 AM
Hello,
the git command looks like available now.
However bower package restore is failing due to this error.
bower angular#~1.2.17 ECMDERR Failed to execute "git ls-remote --tags --heads git://github.com/angular/bower-angular.git", exit code of #128
(works on my machine and mu build server)
Support Staff 5 Posted by rune on 14 Jul, 2014 09:28 PM
Hmm ok - I guess there could be few reasons this'd happen. Perhaps you can try and set
GIT_TRACE=1
in the command line where bower/git is run. That should generate some more usable output. Also see this discussion.There are also a few issues related to the length of the node modules path (at least on my machine). I'm not sure if that's also going to be an issue on AppHarbor though. The issues around this have been discussed here, but we're also working on a workaround for node builds on AppHarbor.
By the way the URL to your app here is a bit off - should be
apphb
instead ofappharbor
.6 Posted by XVincentX on 14 Jul, 2014 09:56 PM
Hello,
even using your command, the error is the same
ECMDERR Failed to execute "git ls-remote --tags --heads git://github.com/angular/bower-angular.git", exit code of #128
Googling on the internet, it Looks like an error due to port forwarding for git protocol port.
About length of node_modules path, it happens only when removing that folder and I managed it using a robocopy script (have a look here: http://www.dotnet-programming.com/post/2014/07/11/Integrate-NodeJS-...)
Support Staff 7 Posted by rune on 16 Jul, 2014 12:19 AM
Hmm ok so git is just installed with the default configuration. Did you have to set anything up locally to configure port forwarding?
Also where did you find out that it was related to port forwarding?
Best,
Rune
8 Posted by XVincentX on 16 Jul, 2014 11:25 AM
Hello again,
I have default git installation too.
I made other searches and looks like error 128 can happens for a lot of motivations:
http://stackoverflow.com/questions/22723345/strange-bower-git-error-error-code-128-could-not-chdir-to-y
Looks like it can work forcing git to get always from https protocol instead of git
Support Staff 9 Posted by rune on 17 Jul, 2014 09:06 AM
Ok got it. Did you try doing that (using HTTPS over the git protocol)?
I think we'll have to look further into this when we have the new feature ready that'll allow greater control over the build process (the feature I referred to in the beginning).
It'll likely be another few weeks and when it's ready you can essentially run a regular command line/batch script as part of the build process. That'll (along with some other tools) will make it easier to create build scripts for node applications.
I suspect that building the node app and running Bower as part of a Visual Studio solution file might add some extra complexity, and in particular it seems to make it more difficult to get the output we'd need to accurately determinate why "error 128" crops up.
Best,
Rune
10 Posted by XVincentX on 17 Jul, 2014 09:18 AM
I tried to force on https with git config but issue remains.
I tried to force it on each build with git config command, but looks like I have no permissions
git config url."https://".insteadOf git://
fatal: Cannot change to 'D:/temp/zc4fiyyp.14d/..': Permission denied
For info, I have no problem with TFS and local MsBuild.
I hope to get news from you with a resolution!
V.Chianese
Support Staff 11 Posted by rune on 18 Jul, 2014 02:13 AM
Hmm ok. I'll let you know when the new customizable build process is in place, and we can give this another shot. If you figure out a solution in the meantime I'd love to hear what the issue is/was.
Best,
Rune
rune closed this discussion on 18 Jul, 2014 02:13 AM.