title: Setting the Package Credentials using Nuget Core DLL
body: <p>I want to get a list of package in a private feed with Http Autentication. This is my code, when I call the ListPlugins Method I get a 401 error, how can I set the credentials?</p>
  
  <pre><code>public  class PluginManager
  {
      private readonly string _pluginFolder;
      private readonly IPackageRepository _packageRepository;
      private readonly PackageManager _packageManager;
  
      public PluginManager(string plugInFolder, string packageRepositoryAddres)
      {
          _pluginFolder = plugInFolder;
          _packageRepository = PackageRepositoryFactory.Default.CreateRepository(packageRepositoryAddres);
          _packageManager = new PackageManager(_packageRepository, _pluginFolder);  
      }
  
      public IEnumerable&lt;PluginModel&gt; ListPlugins()
      {
          IPackage dummy = null;
  
          var result =  _packageManager.SourceRepository.GetPackages()
              .OrderBy(p =&gt; p.Id)
              .ToList()
              .Select(p =&gt; new PluginModel()
              {
                  PackageId = p.Id,
                  PackageVersion = p.Version.ToString(),
                  PackageDescription = p.Description,
                  IsInstalled = _packageManager.LocalRepository.TryFindPackage(p.Id, p.Version, out dummy)
              })
              .ToList();
  
          return result;
      }
  
      public void Install(string packageId, string packageVersion)
      {
          _packageManager.InstallPackage(packageId, new SemanticVersion(packageVersion));
      }
  
      public void Uninstall(string packageId, string packageVersion)
      {
          _packageManager.UninstallPackage(packageId, new SemanticVersion(packageVersion));
      }
  }
  </code></pre>