Skip to content
This repository has been archived by the owner on Mar 20, 2023. It is now read-only.
This repository has been archived by the owner on Mar 20, 2023. It is now read-only.

Git Clone error Azure Function site extension #260

Closed
rikroe opened this issue Jan 16, 2019 · 4 comments
Closed

Git Clone error Azure Function site extension #260

rikroe opened this issue Jan 16, 2019 · 4 comments

Comments

@rikroe
Copy link

rikroe commented Jan 16, 2019

Hi,
when trying to install Batch Shipyard to an Azure Function, I'm getting a weird Access Denied error in git clone....
This is the output of Kudu:

ExitCode: 1, Output: D:\Program Files\Git\cmd\git.exe
D:\Program Files\Git\bin\git.exe
D:\Program Files\Git\mingw64\bin\git.exe
"Batch Shipyard tag ??3"
"Could not git clone to tag ??3 at D:\home\batch-shipyard", Error: Access is denied.
Cloning into 'D:\home\batch-shipyard'...
warning: Could not find remote branch ��3 to clone.
fatal: Remote branch ��3 not found in upstream origin, Kudu.Core.Infrastructure.CommandLineException: Access is denied.
Cloning into 'D:\home\batch-shipyard'...
warning: Could not find remote branch ��3 to clone.
fatal: Remote branch ��3 not found in upstream origin
D:\home\SiteExtensions\BatchShipyard\install.cmd
at Kudu.Core.Infrastructure.Executable.ExecuteInternal(ITracer tracer, Func2 onWriteOutput, Func2 onWriteError, Encoding encoding, String arguments, Object[] args) in C:\Kudu Files\Private\src\master\Kudu.Core\Infrastructure\Executable.cs:line 235
at Kudu.Core.Infrastructure.Executable.ExecuteWithProgressWriter(ILogger logger, ITracer tracer, String arguments, Object[] args) in C:\Kudu Files\Private\src\master\Kudu.Core\Infrastructure\Executable.cs:line 137
at Kudu.Core.SiteExtensions.SiteExtensionManager.<>c__DisplayClass27_1.b__1() in C:\Kudu Files\Private\src\master\Kudu.Core\SiteExtensions\SiteExtensionManager.cs:line 537
at Kudu.Core.Infrastructure.OperationManager.<>c__DisplayClass2_0.b__0() in C:\Kudu Files\Private\src\master\Kudu.Core\Infrastructure\OperationManager.cs:line 16
at Kudu.Core.Infrastructure.OperationManager.Attempt[T](Func1 action, Int32 retries, Int32 delayBeforeRetry, Func2 shouldRetry) in C:\Kudu Files\Private\src\master\Kudu.Core\Infrastructure\OperationManager.cs:line 42
at Kudu.Core.Infrastructure.OperationManager.Attempt(Action action, Int32 retries, Int32 delayBeforeRetry) in C:\Kudu Files\Private\src\master\Kudu.Core\Infrastructure\OperationManager.cs:line 14
at Kudu.Core.SiteExtensions.SiteExtensionManager.d__27.MoveNext() in C:\Kudu Files\Private\src\master\Kudu.Core\SiteExtensions\SiteExtensionManager.cs:line 550
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
at Kudu.Core.SiteExtensions.SiteExtensionManager.d__26.MoveNext() in C:\Kudu Files\Private\src\master\Kudu.Core\SiteExtensions\SiteExtensionManager.cs:line 335

@alfpark
Copy link
Collaborator

alfpark commented Jan 16, 2019

It's possible that a branch was getting force pushed at the same time you were cloning. Can you try re-running the install? You may need to perform it manually (see the docs).

@rikroe
Copy link
Author

rikroe commented Jan 16, 2019

I can't do a manual install from D:\home\SiteExtensions\BatchShipyard as nothing gets cloned - I've tried a couple of times during the day. It's weird as apparently git (started by kudu/nuget) is unable to find the respective branch at the remote (presumably github).

Would a fully manual install (manual git clone from master and then following the Azure Functions instructions work)?
Edit: In the Windows installation instructions the need for having Python 3.6 in PATH is stated. Is that possible/needed for Azure Functions? If so, how can I achieve that?

@alfpark
Copy link
Collaborator

alfpark commented Jan 16, 2019

Sorry, I missed this:

"Batch Shipyard tag ??3"

That's an invalid tag. It might have something to do with the fact that the version.txt file in the Nuget package is encoded as UCS-2 LE BOM and perhaps a change happened with the site extension installer environment.

I'll see if I can force ASCII/UTF-8 encoding for the version.txt file generated with the extension package in a future version.

In the meantime, you can delete the version.txt file in D:\home\SiteExtensions\BatchShipyard and create a new file version.txt with the text 3.6.1 (with no newline). Then try re-running the install.cmd file.

alfpark added a commit that referenced this issue Jan 16, 2019
@rikroe
Copy link
Author

rikroe commented Jan 16, 2019

Not totally sure what fixed it for me. I tried creating the version.txt in D:\home\SiteExtensions\BatchShipyard, D:\home\SiteExtensions\batch-shipyard and also in D:\home\batch-shipyard (because that is where the nuget package apparently tries to clone) but did not work.

Then I restarted the site via Kudu and afterwards in D:\home\SiteExtensions\BatchShipyard the install.cmd and (wrongly encoded) version.txt are there. So changed the version to 3.6.1 and the install is currently running. Many thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants