我将从运行中的管道将所有流量路由到我的远程主机。不幸的是,当进程运行到dotnet restore
时会失败。我曾对代理问题有所考虑,但所有内容在片刻之前都运行良好。请指引我正确的方向。
bibucket-pipeline.yml文件:
image: microsoft/dotnet:2.1-sdk
pipelines:
default:
- step:
caches:
- dotnetcore
script:
- curl https://api.ipify.org
- ssh -fN -C -4 -D 41337 user@remotehost
- export http_proxy='socks5://localhost:41337'
- export https_proxy='socks5://localhost:41337'
- curl https://api.ipify.org
- dotnet restore
- dotnet build
- dotnet test
dotnet --info :
.NET Core SDK (reflecting any global.json):
Version: 2.1.302
Commit: 9048955601
Runtime Environment:
OS Name: debian
OS Version: 9
OS Platform: Linux
RID: debian.9-x64
Base Path: /usr/share/dotnet/sdk/2.1.302/
Host (useful for support):
Version: 2.1.2
Commit: 811c3ce6c0
.NET Core SDKs installed:
2.1.302 [/usr/share/dotnet/sdk]
.NET Core runtimes installed:
Microsoft.AspNetCore.All 2.1.2 [/usr/share/dotnet/shared/Microsoft.AspNetCore.All]
Microsoft.AspNetCore.App 2.1.2 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 2.1.2 [/usr/share/dotnet/shared/Microsoft.NETCore.App]
错误:
/usr/share/dotnet/sdk/2.1.302/NuGet.targets(114,5):错误:无法执行 加载源https://api.nuget.org/v3/index.json的服务索引。 [/opt/atlassian/pipelines/agent/build/PCT.sln]
/usr/share/dotnet/sdk/2.1.302/NuGet.targets(114,5):错误:仅 代理可以使用“ http”方案。 [/opt/atlassian/pipelines/agent/build/PCT.sln]
答案 0 :(得分:0)
到现在(12月18日),dotnet还原仍不支持socks5代理。改用HTTP代理。
我使用privoxy将socks5代理流量转换为http代理。