gpt4 book ai didi

linux - dotnet restore 在配置了代理的 bitbucket 管道上失败

转载 作者:塔克拉玛干 更新时间:2023-11-03 01:16:00 25 4
gpt4 key购买 nike

我将通过我的远程主机路由来自正在运行的管道的所有流量。不幸的是,当进程遇到 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): error : Unable to load the service index for source 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): error : Only the 'http' scheme is allowed for proxies. [/opt/atlassian/pipelines/agent/build/PCT.sln]

最佳答案

到现在(12 月 18 日),dotnet restore 仍然不支持 socks5 代理。请改用 HTTP 代理。

我使用 privoxy 将 socks5 代理流量转换为 http 代理。

关于linux - dotnet restore 在配置了代理的 bitbucket 管道上失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51801200/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com