我正在使用ASP.NET应用程序,并使用Azure和Git进行部署。它被设置为在Master分支被推送到时触发部署。
我过去成功地做到了这一点,但现在失败了。我可以成功地将我的代码推送到GitHub,每次都出现在那里,但它无法在Azure上部署。
从部署中心,我看到提交id以“temp”开头,如“temp-XXXXXX”。它还会在日志详细信息中留下一条错误消息,内容如下:
"fatal: detected dubious ownership in repository at _______ is owned by: ________
but the current owner is _______.
git config --global --add safe.directory '%(prefix)///____________________'\n\r\nC:\Program Files\Git\cmd\git.exe
remote add -t master origin "[email protected]:_____"
(The空白的信息是完整的IP地址与子目录和存储库名称,我不认为这很重要,因为这似乎是一个通用的问题)
我尝试使用safe.directory
提供的确切命令将父目录添加到safe.directory
,但收到错误“no such file or directory:%(前缀)/__。
根据我的本地文件系统,我已经是目录的所有者。
我试着按照this question的答案中列出的一些步骤进行操作,但我不愿意执行git config --global --add safe.directory '*'
,因为它是一个共享存储库。
这个问题会不会是Azure本身造成的?我是否需要以某种方式授予Azure权限?
谢谢
2条答案
按热度按时间nlejzf6q1#
为了提供更新,发现了一个错误。我们的产品工程团队已经推出了修复程序。(来源:Microsoft Q&A My Answer)
wixjitnu2#
请确保运行此命令以将存储库添加到安全列表中,如下所示:-
为了解决错误检查此SO thread answer由Stinn和halt 9 k
然后,我尝试在Azure Web应用中部署示例**
.NET application
,使用.NET 6.0 framework
**,并成功部署,如下所示:-我的github动作流程:-