Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/azure/11.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Git Azure Web App(linux)dotnet core 2.2中默认部署脚本的权限问题_Git_Azure_.net Core_Nuget_Azure Web App Service - Fatal编程技术网

Git Azure Web App(linux)dotnet core 2.2中默认部署脚本的权限问题

Git Azure Web App(linux)dotnet core 2.2中默认部署脚本的权限问题,git,azure,.net-core,nuget,azure-web-app-service,Git,Azure,.net Core,Nuget,Azure Web App Service,在Azure WebApp(linux)for dotnet core 2.2中使用本地git部署方法时,我猜测默认的nuget路径会出现权限问题 这是我在bitbucket上的部署管道 - step: image: microsoft/dotnet name: Deploy DataCore script: - git subtree split -P data-core -b split - git push https://$BACKEND_LOGIN:$BAC

在Azure WebApp(linux)for dotnet core 2.2中使用本地git部署方法时,我猜测默认的nuget路径会出现权限问题

这是我在bitbucket上的部署管道

- step:
  image: microsoft/dotnet
  name: Deploy DataCore
  script:
    - git subtree split -P data-core -b split
    - git push https://$BACKEND_LOGIN:$BACKEND_PASSWORD@$BACKEND_GITURL split:master --force
这是从远程服务器返回的内容,也是部署日志的一部分:

+ git push https://$BACKEND_LOGIN:$BACKEND_PASSWORD@$BACKEND_GITURL split:master --force
remote: Deploy Async        
remote: Updating branch 'master'.        
remote: Updating submodules.        
remote: Preparing deployment for commit id '449e740796'.        
remote: Generating deployment script.        
remote: Running deployment command...        
remote: Handling ASP.NET Core Web Application deployment.        
remote: .........................
remote:   Restoring packages for /home/site/repository/data-core.csproj...        
remote: .
remote:   Installing NuGet.Frameworks 4.7.0.        
remote: /opt/dotnet/2.2.104/sdk/2.2.104/NuGet.targets(114,5): error : Access to the path '/var/nuget/nuget.frameworks/4.7.0' is denied. [/home/site/repository/data-core.csproj]        
remote: /opt/dotnet/2.2.104/sdk/2.2.104/NuGet.targets(114,5): error :   Permission denied [/home/site/repository/data-core.csproj]        
remote: An error has occurred during web site deployment.        
remote: dotnet restore failed        
remote: App container will begin restart within 10 seconds.        
remote: Deployment Logs : 'https://_NAME_.scm.azurewebsites.net/newui/jsonviewer?view_url=/api/deployments/449e74079667b8ff046c75a45d4e2e251f99e4d0/log'        
To https://_NAME_.scm.azurewebsites.net:443/_NAME_.git
   9bfde94..449e740  split -> master
请注意这两个错误

remote:   Installing NuGet.Frameworks 4.7.0.        
remote: /opt/dotnet/2.2.104/sdk/2.2.104/NuGet.targets(114,5): error : Access to the path '/var/nuget/nuget.frameworks/4.7.0' is denied. [/home/site/repository/data-core.csproj]        
remote: /opt/dotnet/2.2.104/sdk/2.2.104/NuGet.targets(114,5): error :   Permission denied [/home/site/repository/data-core.csproj]
此WebApp未在默认设置之外进行配置,我在其他时间使用过此设置。所以我想知道是否有更新需要我改变一些东西

这是我的.csproj文件

<Project Sdk="Microsoft.NET.Sdk.Web">

  <PropertyGroup>
    <TargetFramework>netcoreapp2.2</TargetFramework>
    <AspNetCoreHostingModel>InProcess</AspNetCoreHostingModel>
    <RootNamespace>data_core</RootNamespace>
  </PropertyGroup>

  <ItemGroup>
    <PackageReference Include="AutoMapper" Version="8.1.0" />
    <PackageReference Include="AutoMapper.Extensions.Microsoft.DependencyInjection" Version="6.1.0" />
    <PackageReference Include="Microsoft.AspNetCore.App" />
    <PackageReference Include="Microsoft.AspNetCore.Razor.Design" Version="2.2.0" PrivateAssets="All" />
    <PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="2.2.4" />
    <PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="2.2.4">
      <PrivateAssets>all</PrivateAssets>
      <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
    </PackageReference>
    <PackageReference Include="Pomelo.EntityFrameworkCore.MySql" Version="2.2.0" />
    <PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="2.2.3" />
  </ItemGroup>

</Project>

这一具体方案似乎存在问题。它尝试在全局NuGet文件夹中写入,而全局NuGet文件夹显然是写保护的

<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="2.2.3" />


所以我删除了它

您是删除了该软件包以解决问题,还是升级了版本以解决问题?还有别的吗?
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="2.2.3" />