In Azure DevOps I have my company nuget
repository. I have created some new nuget packages and I included them in my projects. Locally the projects are working fine.
When I run the dotnet build
on DevOps there is error because there is an unauthorize access to the nuget repository.
[error]C:\Program Files\dotnet\sdk\3.1.202\NuGet.targets(124,5): Error : Unable to load the service index for source https://vs.pkgs.visualstudio.com/Vs/_packaging/vs.com/nuget/v3/index.json.
Response status code does not indicate success: 401 (Unauthorized).
C:\Program Files\dotnet\sdk\3.1.202\NuGet.targets(124,5): error : Unable to load the service index for source https://vs.pkgs.visualstudio.com/Vs/_packaging/vs.com/nuget/v3/index.json. [d:\a\1\s\Payments\Payments.csproj]
C:\Program Files\dotnet\sdk\3.1.202\NuGet.targets(124,5): error : Response status code does not indicate success: 401 (Unauthorized). [d:\a\1\s\PiP.Payments.Stripe\PiP.Payments.csproj]
Build FAILED.
C:\Program Files\dotnet\sdk\3.1.202\NuGet.targets(124,5): error : Unable to load the service index for source https://vs.pkgs.visualstudio.com/Vs/_packaging/vs.com/nuget/v3/index.json. [d:\a\1\s\PiP.Payments.Stripe\PiP.Payments.csproj]
C:\Program Files\dotnet\sdk\3.1.202\NuGet.targets(124,5): error : Response status code does not indicate success: 401 (Unauthorized).