Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG]: Cannot use corporate proxy with credentials #5135

Open
1 of 4 tasks
Zegorax opened this issue Mar 3, 2025 · 0 comments
Open
1 of 4 tasks

[BUG]: Cannot use corporate proxy with credentials #5135

Zegorax opened this issue Mar 3, 2025 · 0 comments

Comments

@Zegorax
Copy link

Zegorax commented Mar 3, 2025

What happened?

Ciao everyone,

We are using self-hosted Azure DevOps agents on Linux systems. In this particular environment, the agent is running behind a corporate proxy which requires credentials.

I have been unable to register a new agent behind it. I've tried many things, including --proxypassword and --proxyusername, VSTS_HTTP_PROXY, VSTS_HTTP_PROXY_USERNAME, VSTS_HTTP_PROXY_PASSWORD in both my bash environment and in the .env file.

I've spent my whole day trying different configurations and options, but nothing seems to be working. The error from the Agent is as follows :

[2025-03-03 15:19:14Z ERR  Terminal] System.Net.Http.HttpRequestException: The proxy tunnel request to proxy 'http://x.x.x.x:yyyy/' failed with status code '407'."
   at Microsoft.VisualStudio.Services.Common.VssHttpRetryMessageHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
   at System.Net.Http.HttpClient.<SendAsync>g__Core|83_0(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationTokenSource cts, Boolean disposeCts, CancellationTokenSource pendingRequestsCts, CancellationToken originalCancellationToken)
   at Microsoft.VisualStudio.Services.WebApi.VssHttpClientBase.SendAsync(HttpRequestMessage message, HttpCompletionOption completionOption, Object userState, CancellationToken cancellationToken)
   at Microsoft.VisualStudio.Services.WebApi.VssHttpClientBase.SendAsync[T](HttpRequestMessage message, Object userState, CancellationToken cancellationToken)
   at Microsoft.VisualStudio.Services.Location.Client.LocationHttpClient.GetConnectionDataAsync(ConnectOptions connectOptions, Int64 lastChangeId, CancellationToken cancellationToken, Object userState)
   at Microsoft.VisualStudio.Services.WebApi.Location.VssServerDataProvider.GetConnectionDataAsync(ConnectOptions connectOptions, Int32 lastChangeId, CancellationToken cancellationToken)
   at Microsoft.VisualStudio.Services.WebApi.Location.VssServerDataProvider.ConnectAsync(ConnectOptions connectOptions, CancellationToken cancellationToken)
   at Microsoft.VisualStudio.Services.Agent.LocationServer.ConnectAsync(VssConnection jobConnection) in /mnt/vss/_work/1/s/src/Microsoft.VisualStudio.Services.Agent/LocationServer.cs:line 36
   at Microsoft.VisualStudio.Services.Agent.Util.ServerUtil.GetConnectionData(String serverUrl, VssCredentials credentials, ILocationServer locationServer, Boolean skipServerCertificateValidation) in /mnt/vss/_work/1/s/src/Microsoft.VisualStudio.Services.Agent/Util/ServerUtil.cs:line 94
   at Microsoft.VisualStudio.Services.Agent.Util.ServerUtil.DetermineDeploymentType(String serverUrl, VssCredentials credentials, ILocationServer locationServer, Boolean skipServerCertificateValidation) in /mnt/vss/_work/1/s/src/Microsoft.VisualStudio.Services.Agent/Util/ServerUtil.cs:line 85
   at Microsoft.VisualStudio.Services.Agent.Listener.Configuration.ConfigurationManager.CheckIsHostedServer(IConfigurationProvider agentProvider, AgentSettings agentSettings, ICredentialProvider credProvider, Boolean skipServerCertificateValidation) in /mnt/vss/_work/1/s/src/Agent.Listener/Configuration/ConfigurationManager.cs:line 1010
   at Microsoft.VisualStudio.Services.Agent.Listener.Configuration.ConfigurationManager.ConfigureAsync(CommandSettings command) in /mnt/vss/_work/1/s/src/Agent.Listener/Configuration/ConfigurationManager.cs:line 163

It seems that the agent is not passing the credentials through.

Could you please have a look?

Versions

Azure DevOps Agent, version 4.251.0
Azure DevOps Cloud (dev.azure.com)

Environment type (Please select at least one enviroment where you face this issue)

  • Self-Hosted
  • Microsoft Hosted
  • VMSS Pool
  • Container

Azure DevOps Server type

dev.azure.com (formerly visualstudio.com)

Azure DevOps Server Version (if applicable)

No response

Operation system

Oracle Linux Server 8.10

Version controll system

No response

Relevant log output

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant