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]: Nuget restore results in 401 Unauthorized on self-hosted agent when run as windows service #4771

Closed
1 of 4 tasks
dcepu opened this issue Apr 23, 2024 · 3 comments
Closed
1 of 4 tasks

Comments

@dcepu
Copy link

dcepu commented Apr 23, 2024

What happened?

The pipeline started making truble some time ago. It can't access the private feed if you start the agent in windows service. However when started in CMD it works just fine.

Versions

Agent: 3.238.0
dotnet: 8.0

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

windows 10

Version controll system

No response

Relevant log output

From pipeline on dotnet publish:
C:\Program Files\dotnet\sdk\8.0.104\NuGet.targets(156,5): error : Unable to load the service index for source https:/Local/nuget/v3/index.json. [C:\agent\_work\r28\a\e.csproj]
C:\Program Files\dotnet\sdk\8.0.104\NuGet.targets(156,5): error :   Response status code does not indicate success: 401 (Unauthorized). [C:\agent\_work\r28\a\_test\e.csproj]

From agent:
[2024-04-23 11:25:02Z INFO Terminal] WRITE LINE: 2024-04-23 11:25:02Z: Agent job wird ausgeführt
[2024-04-23 11:25:02Z INFO AgentServer] Refresh JobRequest VssConnection to get on a different AFD node.
[2024-04-23 11:25:02Z INFO AgentServer] Establish connection with 30 seconds timeout.
[2024-04-23 11:25:02Z INFO VisualStudioServices] Starting operation Location.GetConnectionData
[2024-04-23 11:25:02Z INFO VisualStudioServices] Finished operation Location.GetConnectionData
[2024-04-23 11:25:02Z INFO JobDispatcher] Start renew job request 267812 for job 4503ab6c-fa37-51f2-214f-9e2431890938.
[2024-04-23 11:25:02Z INFO JobDispatcher] Successfully renew job request 267812, job is valid till 23.04.2024 11:35:02
[2024-04-23 11:25:02Z INFO ConfigurationStore] HasCredentials()
[2024-04-23 11:25:02Z INFO ConfigurationStore] stored True
[2024-04-23 11:25:02Z INFO CredentialManager] GetCredentialProvider
[2024-04-23 11:25:02Z INFO CredentialManager] Creating type OAuth
[2024-04-23 11:25:02Z INFO CredentialManager] Creating credential type: OAuth
[2024-04-23 11:25:02Z INFO RSAEncryptedFileKeyManager] Loading RSA key parameters from file C:\agent\.credentials_rsaparams
[2024-04-23 11:25:02Z INFO ConfigurationManager] LoadSettings
[2024-04-23 11:25:02Z INFO ConfigurationStore] IsConfigured()
[2024-04-23 11:25:02Z INFO ConfigurationStore] IsConfigured: True
[2024-04-23 11:25:02Z INFO ConfigurationManager] Is configured: True
[2024-04-23 11:25:02Z INFO ConfigurationManager] Settings Loaded
[2024-04-23 11:25:02Z WARN VisualStudioServices] Authentication failed with status code 401.
@aleksandrlevochkin
Copy link
Contributor

Hi @dcepu, thanks for reporting this issue! Do you experience the same problem with previous versions of the agent, such as 3.236.1?

@dcepu
Copy link
Author

dcepu commented Apr 25, 2024

@aleksandrlevochkin The agent's version was 2.217.2 and I had the same problem. I have updated it to the newest, 3.238.0, and the problem still occurs. I haven't tried the 3.236.1 version.

Copy link

This issue has had no activity in 180 days. Please comment if it is not actually stale

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

2 participants