我在使用Linux时遇到麻烦推向VSTS。我已经尝试了很多东西,比如在Linux上安装NuGet Package(这是过时的)(版本2.5。*)。由于没有工作,我已经安装了单声道并运行NuGet 3.5和4.0以推送到VSTS。而现在我却因为得到了错误的请求而陷入困境。
这是我使用的命令:
data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI0NDAiIGhlaWdodD0iNDQwIj48cmVjdCB4PSIwIiB5PSIwIiB3aWR0aD0iMTAwJSIgaGVpZ2h0PSIxMDAlIiBmaWxsPSJyZ2IoMTI3LCA1NCwgNjApIiAgLz48cmVjdCB4PSIwIiB5PSI1IiB3aWR0aD0iMTAwJSIgaGVpZ2h0PSIxNSIgb3BhY2l0eT0iMC4xMDY2NjY2NjY2NjY2NjY2NyIgZmlsbD0iI2RkZCIgIC8+PHJlY3QgeD0iMCIgeT0iMjkiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjE4IiBvcGFjaXR5PSIwLjEzMjY2NjY2NjY2NjY2NjY1IiBmaWxsPSIjMjIyIiAgLz48cmVjdCB4PSIwIiB5PSI1NyIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAiIG9wYWNpdHk9IjAuMDYzMzMzMzMzMzMzMzMzMzQiIGZpbGw9IiMyMjIiICAvPjxyZWN0IHg9IjAiIHk9IjgyIiB3aWR0aD0iMTAwJSIgaGVpZ2h0PSIxMyIgb3BhY2l0eT0iMC4wODkzMzMzMzMzMzMzMzMzMyIgZmlsbD0iI2RkZCIgIC8+PHJlY3QgeD0iMCIgeT0iMTEzIiB3aWR0aD0iMTAwJSIgaGVpZ2h0PSIxMiIgb3BhY2l0eT0iMC4wODA2NjY2NjY2NjY2NjY2NiIgZmlsbD0iIzIyMiIgIC8+PHJlY3QgeD0iMCIgeT0iMTM3IiB3aWR0aD0iMTAwJSIgaGVpZ2h0PSIxMyIgb3BhY2l0eT0iMC4wODkzMzMzMzMzMzMzMzMzMyIgZml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0iI2RkZCIgIC8+PHJlY3QgeD0iMzc3IiB5PSIwIiB3aWR0aD0iNSIgaGVpZ2h0PSIxMDAlIiBvcGFjaXR5PSIwLjAyIiBmaWxsPSIjZGRkIiAgLz48cmVjdCB4PSIzOTgiIHk9IjAiIHdpZHRoPSIxNiIgaGVpZ2h0PSIxMDAlIiBvcGFjaXR5PSIwLjExNTMzMzMzMzMzMzMzMzM0IiBmaWxsPSIjMjIyIiAgLz48cmVjdCB4PSI0MzEiIHk9IjAiIHdpZHRoPSI5IiBoZWlnaHQ9IjEwMCUiIG9wYWNpdHk9IjAuMDU0NjY2NjY2NjY2NjY2NjciIGZpbGw9IiNkZGQiICAvPjwvc3ZnPg==
这是我使用的nuget.config:
mono NuGet.exe push pack/package.nupkg -Source "TFS" -ApiKey VSTS
发生了什么事?如果我将详细程度设置为详细信息,我将获得下一个堆栈跟踪:http://pastebin.com/F5WfZpqN我已将它放在PasteBin上,因为它是一个非常长的堆栈跟踪。
使用完全相同的命令和配置从Windows推送正在运行。但是由于我们的CI是在GitLab和运行Debian Jessie的Linux机器上,我们必须在那里工作。
答案 0 :(得分:0)
我已经完成了卸载所有mono-complete但保留了Debian的依赖关系。然后我从我的项目中删除了nuget.exe(nuget 3.5和4.0)并安装了nuget apt-get install nuget
这个nuget版本是2.12.0.0
,因为这是nuget的第2版我已经将配置更改为配置下面。请注意以nuget/v2
结尾的广告的网址:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<add key="NuGet" value="https://api.nuget.org/v3/index.json" />
<add key="aspnet-contrib" value="https://www.myget.org/F/aspnet-contrib/api/v3/index.json" />
<add key="TFS" value="https://some.pkgs.visualstudio.com/_packaging/package/nuget/v2" />
</packageSources>
<activePackageSource>
<add key="All" value="(Aggregate source)" />
</activePackageSource>
<packageSourceCredentials>
<TFS>
<add key="Username" value="some@emailregisteredatvsts.nl" />
<add key="ClearTextPassword" value="somepassword" />
</TFS>
</packageSourceCredentials>
</configuration>
这个设置在本地和我的ci工作,所以我很高兴。 我在这篇文章中得到了很多帮助:https://github.com/NuGet/Home/issues/3251