projectkudu / kudu

Kudu is the engine behind git/hg deployments, WebJobs, and various other features in Azure Web Sites. It can also run outside of Azure.
Apache License 2.0
3.12k stars 652 forks source link

Fatal: detected dubious ownership in repository #3483

Closed tigreye007 closed 1 year ago

tigreye007 commented 1 year ago

We started receiving the following error in our App Service Build Service (Kudu) continuous deployment setups today. We're not sure when it would have started, but we had successes last week. We've had no change in configuration, and I have verified on 3 separate app service/repository combinations that this is occurring universally for us. Any ideas on what might be going on?

fatal: detected dubious ownership in repository at '[redacted]'\n'[redacted]' is owned by:\n '[redacted]'\nbut the current user is:\n [redacted]'\nTo add an exception for this directory, call:\n\n git config --global --add safe.directory '[recacted]'\n\r\nC:\Program Files\Git\cmd\git.exe remote add -t master origin "git@github.com:Lightburn/Doral.Website.git"

Repro steps.

Triggered a build with a commit into the associated branch (multiple repos/app services)

justinbangerter commented 1 year ago

We also started receiving this error in our production build server around the same time.

suwatch commented 1 year ago

Please navigate to SCM (Kudu) / Debug Console and run git config --global --add safe.directory "*" command. See if that mitigate the issue. Do share the stamp name env information (WEBSITE_HOME_STAMPNAME) - it should be something like waws-prod-.....

jvano commented 1 year ago

Hi

Please file incidents in Azure, so we can better track and assist on this case: https://learn.microsoft.com/en-us/azure/azure-portal/supportability/how-to-create-azure-support-request

Thanks,

Joaquin

justinbangerter commented 1 year ago

Sorry, I forgot to mention that we already tried that. The result on our app server with problems is:

error: could not lock config file C:/home/.gitconfig: Permission denied

We'll look into filing this on azure support.

suwatch commented 1 year ago

Thank for reporting. We have identified the issue and currently is working on the fix. The issue is due to the new git (2.39.2) rollout by Azure App Service along with missing write permission on c:\home directory for sites created on or prior to 2018 - leading to the issue. We will update the progress of fix rollout. Thanks for your patience,

suwatch commented 1 year ago

To update, the fix is being rolled out and may apply to different regions at different time. The ETA for completion to all regions is end of Sat 9/16/2023 if not earlier.

suwatch commented 1 year ago

Fix has been rolled out completely - apology for the incoveneince.