Skip to content
This repository has been archived by the owner on Jan 26, 2022. It is now read-only.

Commit

Permalink
Initialize NuGet's Credential Service (#1)
Browse files Browse the repository at this point in the history
Initialize NuGet's credential provider service to be able to use private Azure Artifacts feeds via Microsoft's Azure Artifacts credential provider.
  • Loading branch information
ransagy committed Oct 27, 2019
1 parent 4d52b70 commit 186ca2e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions NuKeeper/Local/LocalEngine.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
using System.Linq;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
using NuGet.Credentials;
using NuKeeper.Abstractions.Configuration;
using NuKeeper.Abstractions.Inspections.Files;
using NuKeeper.Abstractions.Logging;
Expand Down Expand Up @@ -43,6 +44,8 @@ public LocalEngine(

public async Task Run(SettingsContainer settings, bool write)
{
DefaultCredentialServiceUtility.SetupDefaultCredentialService(new NuGet.Common.NullLogger(), true);

var folder = TargetFolder(settings.UserSettings);

var sources = _nuGetSourcesReader.Read(folder, settings.UserSettings.NuGetSources);
Expand Down
1 change: 1 addition & 0 deletions NuKeeper/NuKeeper.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="NuGet.Credentials" Version="5.2.0" />
<PackageReference Include="SimpleInjector" Version="4.7.1" />
</ItemGroup>
<ItemGroup>
Expand Down

0 comments on commit 186ca2e

Please sign in to comment.