Open Closed

issue when build project on Azure Devops pipeline #2009


0
easonyang created

When I build out project on Azure Devops pipeline, the job always failed. I got the error message:

Retrying 'FindPackagesByIdAsync' for source 'https://nuget.abp.io/{MY_API_KEY}/v3/package/microsoft.build.tasks.git/index.json'. Response status code does not indicate success: 403 (Forbidden).

  • ABP Framework version: v4.x
  • UI type: MVC
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): yes / no
  • Exception message and stack trace: Response status code does not indicate success: 403 (Forbidden).
  • Steps to reproduce the issue:"
      1. Open https://dev.azure.com/{my_organization}
      1. New a pipeline and add a task of Bash
      1. Add scripts: dotnet build -c Release
      1. Run the Pipeline
      1. In the job details, I got the failed message.

10 Answer(s)
  • 0
    maliming created
    Support Team

    hi

    What's your NuGet.Config ?

    <?xml version="1.0" encoding="utf-8"?>
    <configuration>
      <packageSources>
        <add key="nuget.org" value="https://api.nuget.org/v3/index.json" />
        <add key="BlazoriseMyGet" value="https://www.myget.org/F/blazorise/api/v3/index.json" />
        <!-- {ABP_COMMERCIAL_NUGET_SOURCE} -->
      </packageSources>
    </configuration>
    
  • 0
    easonyang created

    hi

    What's your NuGet.Config ?

    <?xml version="1.0" encoding="utf-8"?> 
    <configuration> 
      <packageSources> 
        <add key="nuget.org" value="https://api.nuget.org/v3/index.json" /> 
        <add key="BlazoriseMyGet" value="https://www.myget.org/F/blazorise/api/v3/index.json" /> 
        <!-- {ABP_COMMERCIAL_NUGET_SOURCE} --> 
      </packageSources> 
    </configuration> 
    

    Yes. The same with yours.

  • 0
    easonyang created

    <?xml version="1.0" encoding="utf-8"?> <configuration> <packageSources> <add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" /> <add key="BlazoriseMyGet" value="https://www.myget.org/F/blazorise/api/v3/index.json" /> <add key="ABP Commercial NuGet Source" value="https://nuget.abp.io/{My API KEY}/v3/index.json" /> </packageSources> </configuration>

  • 0
    maliming created
    Support Team

    Can you try to remove protocolVersion?

  • 0
    easonyang created

    Can you try to remove protocolVersion?

    I've tried and still failed.

  • 0
    easonyang created

    It's so strange that when I build ten times, nine times fail and one time success. Did u block the IPs of Azure DevOps?

  • 0
    maliming created
    Support Team

    We not block any ip but we will check this.

  • 0
    ismcagdas created
    Support Team

    Hi @easonyang

    • Does it make any difference if you run dotnet restore before the build operation ?
    • Could you share the full error log ? This error might be happening for a specific package.

    Thanks,

  • 0
    ismcagdas created
    Support Team

    Hi @easonyang

    Can you try againg ? This was caused by a rule on on firewall. It should be working now.

    Thanks,

  • 0
    easonyang created

    @ismcagdas

    I re-tried and it works now.

    Thanks very much for your support.