Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/email/3.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
Nuget忽略网络共享的凭据_Nuget_Nuget Package Restore - Fatal编程技术网

Nuget忽略网络共享的凭据

Nuget忽略网络共享的凭据,nuget,nuget-package-restore,Nuget,Nuget Package Restore,我使用网络windows共享作为nuget软件包源。除了我们的管理员想在这个共享上设置一些身份验证之外,一切都很好 问题:将nuget配置为与用户/pass共享 我尝试的内容:更改我的nuget.config,添加此共享的PackageSourceRedentials。这是我更改的nuget.config: <?xml version="1.0" encoding="utf-8"?> <configuration> <packageRestore>

我使用网络windows共享作为nuget软件包源。除了我们的管理员想在这个共享上设置一些身份验证之外,一切都很好

问题:将nuget配置为与用户/pass共享

我尝试的内容:更改我的nuget.config,添加此共享的PackageSourceRedentials。这是我更改的nuget.config:

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <packageRestore>
    <add key="enabled" value="true" />
  </packageRestore>
  <packageSources>
    <add key="Custom" value="\\some\share\nuget\" />
    <add key="NuGet" value="https://nuget.org/api/v2/" />
  </packageSources>
  <packageSourceCredentials>
    <Custom>
      <add key="Username" value="test" />
      <add key="Password" value="somelongencodedvalue" />
    </Custom>
  </packageSourceCredentials>
</configuration>

但nuget尝试使用当前登录的windows用户登录,并且未使用配置中的凭据。我做错了什么?packageSourceCredentials是否仅适用于http包源?

您没有做错什么。 我今天遇到了同样的问题。我发现nuget首先尝试使用用户的当前凭据进行身份验证。如果失败,将获取配置文件的凭据