kudu: Can no longer push to remote git repo in Azure App Service Editor (preview)

The issue is that I’m no longer able to “push” to a remote Git repo from Azure App Service Editor or Kudu console.

I started this by outlining my specific error, then realised this happens even on a new and empty Web App… so I’ve tried to make the repro below as generic as I can:

Repro from Blank

  • Create a new github repo (e.g. https://github.com/jk-ncsc/testing-ASE)
  • Create a new Web App in Azure (Free Tier - F1, B1 also tested) (e.g. “testing-ase[.]azurewebsites[.]net”)
  • Open “App Service Editor (preview)” in WebApp options
  • Select “Git” section and add a git repo (sync works fine)
  • Make a change (e.g. add a file)
  • Select “Git” section and commit change with a message (success)
  • Select “Git” dropdown and select “push” (hangs a while then errors, blank message in UI)
  • Developer tools error message is “There was an issue running a git operation. Please use the console to check the state of your repository.” (same on latest Chrome & Edge)
  • Open console, check “git status” and then do a"git push" (fails)
  • In this example, it just hangs, with no output
  • I had the following explicit output on my main projects (both api apps give same errors)
error: cannot create standard input pipe for git credential-manager get: Function not implemented
error: cannot create standard input pipe for "$HOME/bin/cred.sh" get: Function not implemented
error: cannot create standard output pipe for D:\home\data\monaco\home\empty.cmd: Function not implemented
error: cannot create standard input pipe for bash: Function not implemented
fatal: could not read Password for 'https://<USERNAME>@bitbucket.org/<NAME>/<PROJECT>.git': Function not implemented

I’ve been using the ASE for months successfully. Last successful push was 17th Dec I think!

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 30 (14 by maintainers)

Most upvoted comments

Good news: the fix has now been deployed, so it should all work with you needing to do anything special. Please do verify.

Going to fix this so it’s set by default in App Service Editor. Worth doing a one liner for this 😃

Thanks @suwatch, this provides a very simple workaround for this problem: go to your Web App’s App Settings and add GCM_MODAL_PROMPT=0. And everything should start working again 😃

Others, can you verify?

Looking at the process tree after attempting a push is quite telling:

image

So I think what’s happening is that whatever logic Monaco is using to register with the credential manager (so it can put u its custom UI) is no longer working. As a result, it’s probably falling back to prompting for creds on the git command line, which hangs because there is no interactive console to type things in.

So the challenge is to figure out why the credential manager custom UI got busted.

Indeed, the root problem here is that Monaco (App Service Editor) is not an area that is receiving much investment, and the goal is roughly to “keep it mostly working as long as it’s not expensive”. Primary goal is to allow editing files with an editor that is superior to what’s in Kudu. But the git support is sadly in neglect.

So yes, clearly something related to the credential manager broke, and right now no one knows why. One candidate is that around January, we moved from Server 2012 to Server 2016, which maybe affected that at some level.

If someone feels like trying to figure it out, you can find all the Monaco sources under D:\Program Files (x86)\SiteExtensions\Monaco from Kudu Console. There is even a way you can run a modified version of it using a private site extension. It’s a Node app that’s running on an ancient version of Node (0.10.29).

Another thing worth mentioning is that we’re about to move from 32 bit to 64 bit git on the VM, to deal with random git issues that have been plaguing us (see https://github.com/projectkudu/kudu/issues/2714 and https://github.com/git-for-windows/git/wiki/32-bit-issues). Not sure how that will affect Monaco at this point.

This is App Service Editor where git operations are provided via Web Application. I added more info you asked on https://github.com/Microsoft/Git-Credential-Manager-for-Windows/issues/649.

To address issue at hand, there are two workarounds mentioned in https://github.com/Microsoft/Git-Credential-Manager-for-Windows/issues/649 and they both worked great for me. So please try it and let us know.

As for overriding the modal dialog, sure. Use environment variable GCM_MODAL_PROMPT=0 or git config credential.modalPrompt false.

Note: For environment solution, do add AppSettings to Web App instead.

Microsoft’s acquiring GitHub. 👍 How does this affect them users? Incredibly positively I presume. Anyhoo! expecting a great deal out of this.

The cred hook is done thru credential.helper. App Service Editor adds this config in webapp’s D:\home\data\monaco\home\.gitconfig.

\ [master]> git config --global --list
...
credential.helper=!"$HOME/bin/cred.sh"

The $HOME points to App Service Editor’s home which is d:\Program Files (x86)\SiteExtensions\Monaco\1.0.0-20180530\server\home. The issue seems to be the git-credential-manager does not take credential.helper as precedent over its built in auths for GitHub\Bitbucket.. etc. If I remove either git-credential-manager.exe or GitHub.Authentication.exe from d:\Program Files (x86)\Git\mingw32\libexec\git-core, then credential.helper will kick it. We are checking with dev owning to see what is the cleaner way and why it was working before.

@davidebbo it is exactly this problem (at least for me). Ive noticed that and tried killing the process (in kudu), then it promptly shows me the modal where I am supposed to put my bitbucket creds, I do it and still it doesn’t work. Then the underlying op is always timed out.

For some reason the process for inputting the git creds is not working properly.

@jk-ncsc are you seeing this with a public or private repo? I’m surprised that you see git pull being broken if the repo is public (as in your initial steps).

The issue appears related to doing a push on an https git endpoint. If you go to Kudu process explorer, you can see that it tries to launch git-credential-manager, and maybe gets stuck there because that tries to pop up UI.

One workaround is to create a Personal access token (https://github.com/settings/tokens) and then embed that in your git remote. e.g. your remote would look like https://youruser:yourtoken@github.com/jk-ncsc/testing-ASE.git

Still there for me too. Very frustrating. The error message bug is fixed (I can see them now), but difference highlighting and general git push/pull is broken.