Question

Markus Johnsson on Thu, 31 Oct 2013 14:49:21


We are using git deploy for our azure website. It has worked great so far, but today we cannot make a push deploy. We're getting this error on the command line:

remote: hooks/post-receive: line 4: D:\Program: No such file or directory

Has anyone seen this or have any idea of what is going on?

We're using git 1.8.4 and the website is running on North Europe.

The full push message with the error in context:

git push azure master Password for 'https://-----.scm.azurewebsites.net': Counting objects: 165, done. Delta compression using up to 8 threads. Compressing objects: 100% (95/95), done. Writing objects: 100% (141/141), 5.84 MiB | 36.00 KiB/s, done. Total 141 (delta 39), reused 132 (delta 35) remote: hooks/post-receive: line 4: D:\Program: No such file or directory To https://------.scm.azurewebsites.net/----.git

   f1cd51d..19b303e  master -> master

Thanks in advance!

Markus


Sponsored



Replies

Suwat Ch on Thu, 31 Oct 2013 17:08:14


Could you share the content of the post-receive hook file?  By default, there should not be any sensitive data.   To get the file, you can use DebugConsole.   Type out the file, C:\DWASFiles\Sites\<sitename>\VirtualDirectory0\site\repository\.git\hooks\post-receive.

Cheer,

Suwat Ch on Thu, 31 Oct 2013 19:06:39


we know what the issue was.   your post-receive hook (or your site) must have been created over a year ago.   we fixed the quote issue last year.   you can patch your post-receive hook manually (using either FTP or kudu console mentioned above).   The content should look like this.

#!/bin/sh
read i
echo $i > pushinfo
"$KUDU_EXE" "$KUDU_APPPATH" "$KUDU_MSBUILD" "$KUDU_DEPLOYER"

Just put quote around each of them.  Sorry for the inconvenient,


Suwatch


Pedro Mag on Thu, 31 Oct 2013 22:26:53


Could you share the content of the post-receive hook file?  By default, there should not be any sensitive data.   To get the file, you can use DebugConsole.   Type out the file, C:\DWASFiles\Sites\<sitename>\VirtualDirectory0\site\repository\.git\hooks\post-receive.

Cheer,


Suwatch

I'm still unable to access the DebugConsole in any of my websites. Not with the deployment credentials nor the FTP ones. Any idea why? It gives me a 403 - You do not have permission to view this directory or page.

Suwat Ch on Thu, 31 Oct 2013 22:29:58


Did you try the one in Site => CONFIGURE tab.   There is a deployment trigger url.   Could try copy/paste that URI to chrome?

Pedro Mag on Thu, 31 Oct 2013 22:32:52


Yes, I tried that one first and then using the FTP credentials as seen on David Ebbo's video.

They both produce the same error.

Pedro Mag on Thu, 31 Oct 2013 22:39:55


But returning to the thread topic as well, I have a build.sh script running upon deployment. It was working normally but I suddenly started receiving the error mentioned above. After adding "" to the $KUDU_SYNC_CMD variable, I now get - "D:\Program Files (x86)\SiteExtensions\Kudu\1.24.20926.5\bin\scripts\kudusync": No such file or directory - and my deployment fails.

Any ideas?

AmitApple on Thu, 31 Oct 2013 22:50:03


Did you add the " to $KUDU_SYNC_CMD now and it started to fail?

Can you remove the quotes from $KUDU_SYNC_CMD?

Thanks,

Amit

Pedro Mag on Thu, 31 Oct 2013 22:58:15


I didn't change the deploy script for some time and today when I tried to make a deployment I got the error: D:\Program: No such file or directory.

Following the tip posted above, I added the " to my $KUDU_SYNC_CMD call and I got "D:\Program Files (x86)\SiteExtensions\Kudu\1.24.20926.5\bin\scripts\kudusync": No such file or directory

However, following also the tip from https://gist.github.com/rnikitin/6717673#comment-917058 I added: KUDU_SYNC_CMD=${KUDU_SYNC_CMD//\"} before the "$KUDU_SYNC_CMD" and now it seems to be working.

David Ebbo on Fri, 01 Nov 2013 00:06:45


@Pedro: yes, that is a separate issue from the one with the post-receive hook, though both relate to quoting. The gist you found has the correct fix.