【问题标题】:How to avoid nuget authentication when pushing package?推送包时如何避免nuget身份验证?
【发布时间】:2013-09-02 08:34:24
【问题描述】:

在将 nuget 包推送到 http://localhost/site 的本地提要时,它会要求提供凭据。

例如:nuget push 'OracleDataAccess.1.0.0.nupkg' -s 'http://10.xx.xx.2/SNNuget/mykey'

我可以直接浏览提要并查看我手动放置的包。 有可能禁用它吗?或任何其他解决方案?

【问题讨论】:

    标签: authentication nuget nuget-package nuget-server


    【解决方案1】:

    这不是 ApiKey 的用途吗?

    nuget push foo.nupkg 33300000-3330-3330-3330-333033303330 -s http://customsource/ 
    

    【讨论】:

      【解决方案2】:

      也许以下 Gist 可以帮助您? https://gist.github.com/xavierdecoster/3205826

      它包含 nuget.exe 命令,可让您将提要凭据存储在开发计算机上。

      【讨论】:

        【解决方案3】:

        您可以在https://www.nuget.org/account下找到您的Api Key, 它看起来像这样: 您可以将 API 密钥 作为命令行参数传递给 nuget push,或者最好使用 nuget setapikey <key> -source <url> [options] 将服务器 URL 与其凭据绑定,再也不用担心它了 :)

        【讨论】:

          猜你喜欢
          • 2022-06-10
          • 1970-01-01
          • 2018-08-28
          • 2019-07-20
          • 1970-01-01
          • 2020-04-10
          • 1970-01-01
          • 1970-01-01
          • 2021-08-19
          相关资源
          最近更新 更多