1
votes

I'm going to route all the traffic from running pipeline throught my remote host. Unfotunately, when a process run into dotnet restore it fails. I have thoughts about proxy issues but all stuff worked as well before a moment. Direct me, please, into right direction.


Here the environment

bibucket-pipeline.yml file:

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]

Errors:

/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]

1

1 Answers

0
votes

By now (Dec 18), dotnet restore still does not support socks5 proxy. Use HTTP proxy instead.

I use privoxy to convert socks5 proxy traffic to http proxy.