TLS Failed to Verify Certificate: Connecting to ACR Registry using Private Endpoint ADO Pipeline

Abstract: Resolve TLS certificate verification errors in Azure DevOps pipelines when connecting to an ACR via Private Endpoint by fixing DNS resolution and updating trusted root certificates on self-hosted agents.

Created: 2026-09-06 by

Resolve the "TLS Failed to Verify Certificate" error in Azure DevOps pipelines when connecting to an Azure Container Registry (ACR) via a Private Endpoint by ensuring the pipeline agent can resolve internal DNS names and trusts the correct root certificates. This issue typically stems from network isolation or missing certificate trust stores on the build agents.

Understanding the Network Isolation

When you configure an Azure Container Registry with a Private Endpoint, standard public internet routes are blocked for that registry. The registry becomes accessible only through your Virtual Network (VNet). In an Azure DevOps self-hosted agent scenario, this creates a complex networking topology. The agent must be able to reach the private IP address assigned to the ACR Private Endpoint. If the agent is running on a different subnet or outside the VNet without proper peering, it cannot establish the TCP connection required for TLS handshake. Even if the network path exists, the TLS verification failure indicates that the client (the agent) does not recognize the certificate presented by the ACR. ACR uses managed identity and automatically provisions SSL/TLS certificates. These certificates are signed by Microsoft’s internal certificate authorities. For a secure connection to succeed, the machine running the Azure DevOps agent must have these specific CA certificates in its trusted store. Without them, the operating system rejects the connection as untrusted, resulting in the generic TLS error message.

Verifying DNS Resolution

Before diving into certificates, confirm that the agent can resolve the ACR domain name to the private IP. Public DNS servers will return the public IP or fail entirely because the Private Endpoint disables public access. You need to ensure that the agent is using the VNet’s internal DNS server. On Linux agents, check the /etc/resolv.conf file. On Windows agents, verify the network adapter settings. If the agent relies on public DNS like Google's 8.8.8.8, it will never find the private endpoint. Use the following command to test resolution from the agent machine:
nslookup <your-registry-name>.azurecr.io
The response should show an IP address within your VNet’s CIDR range, not a public Azure IP. If it returns a public IP or times out, the DNS configuration is incorrect. Ensure that Azure DNS integration is enabled for your VNet or that you have configured conditional forwarders correctly. This step is critical because even with perfect certificates, a DNS mismatch prevents the initial connection attempt.

Configuring Trusted Root Certificates

The core of the "TLS Failed to Verify Certificate" error is often a missing trust anchor. Self-hosted agents do not always come pre-loaded with the latest Microsoft enterprise CA certificates, especially in minimal containerized environments. You must explicitly add the Azure infrastructure certificates to the agent’s trust store. For Linux-based agents, you can update the certificate store using the package manager. Run the following commands to install and update the CA certificates:
sudo apt-get update
sudo apt-get install ca-certificates
sudo update-ca-certificates
On Windows agents, you may need to manually import the relevant certificates into the "Trusted Root Certification Authorities" store. Microsoft provides documentation on which specific certificates are required for Azure services. Often, simply updating the OS and applying the latest security patches ensures that the necessary root CAs are present. However, in hardened or custom-built images, you might need to download the specific Microsoft IT TLS CA certificates and import them programmatically during the agent initialization phase.

Checking Agent Network Configuration

If DNS and certificates are correct, verify the agent’s network interface. Ensure that the agent is connected to the same VNet or a peered VNet that has a route to the ACR subnet. Use PowerShell or CLI tools to inspect the routing table. Look for a default route or a specific route pointing to the Private Endpoint’s gateway. If the agent is in a different subscription, ensure that VNet peering is bidirectional and that resource locks or NSG rules are not blocking traffic on port 443. You can also use curl or Invoke-WebRequest from the agent to test connectivity directly to the ACR URL. This isolates whether the issue is with the Azure DevOps task runner or the underlying network stack. If curl fails with the same TLS error, the problem is definitely at the OS or network level, not the pipeline configuration.

Pipeline and Task Adjustments

Sometimes the issue lies in how the Azure DevOps tasks interact with the environment. Ensure that you are using the latest version of the Docker@2 task or the AzureContainerRegistry@1 task. Older versions may have hardcoded behaviors that conflict with modern Private Endpoint implementations. Clear the cache and restart the agent service to force a fresh load of the certificate store and network configurations. Additionally, check for any proxy settings defined in the agent’s environment variables. If a proxy is configured, it might be intercepting the TLS connection and presenting its own certificate, which is not trusted by the ACR. Disable proxies for internal Azure resources if possible, or ensure the proxy is configured to pass through the ACR domain without inspection.

Frequently Asked Questions

Why does this work locally but fail in the pipeline?

Local machines often have updated certificate stores and direct VNet access via VPN or ExpressRoute. Pipeline agents run in isolated containers or VMs that may lack the specific Azure CA certificates or have restricted DNS resolution. Always replicate the exact network environment of the agent locally to debug these discrepancies.

Can I disable TLS verification to fix this quickly?

Disabling TLS verification is a severe security risk and not recommended for production pipelines. It exposes your registry to man-in-the-middle attacks. Instead, focus on installing the correct root certificates or fixing the DNS configuration to establish a genuine secure connection.

What if my agent is in a different subscription?

VNet peering must be established between the subscriptions hosting the agent and the ACR. Ensure that the peering is active and that network security groups allow traffic between the subnets. Cross-subscription communication requires explicit permission and correct routing tables to function properly.

How do I update certificates on a Windows agent?

Use the Microsoft Management Console (MMC) to open the Certificate Manager snap-in. Navigate to Trusted Root Certification Authorities and import the required Microsoft IT TLS CA certificates. Alternatively, use Group Policy or scripts to automate this process across multiple agents in your pool.

Does Azure DevOps Managed Identity help with this error?

Managed Identity solves authentication issues, not network or TLS verification errors. Even with Managed Identity, the underlying transport layer must successfully complete the TLS handshake. Therefore, resolving the certificate trust and DNS issues remains essential regardless of the authentication method used.

Latest News

How to Display Output of xterm Command in Terminal Screen using Cron

Resolve the inability to display xterm output in a terminal screen from cron by redirecting logs or using wall instead of insecure X11 workarounds.

Read More
Expose Local Server on VPS Preserving Real Client IPs (OS Level)

Resolve VPS logging showing only gateway IPs by configuring reverse proxies to forward real client addresses via X-Forwarded-For headers.

Read More
How to Clear Recent Files History in Linux without Deleting Actual Files?

Clear recent files history in Linux by deleting ~/.local/share/recently-used.xbel without removing the actual files.

Read More
Best HDD Copy Strategy: Manually Syncing and Rewriting Scratch

Resolve data drift between two 4TB hard drives by using rsync with the --delete flag to manually sync and rewrite scratch data for an exact mirror.

Read More
Understanding Bash Prompt Abbreviations: An Overview

Resolve repetitive typing errors by creating and persisting Bash aliases in the .bashrc file for improved command-line efficiency.

Read More
Free Tools and Methods to Log Real-Time Performance Details in Task Manager

Log real-time CPU and memory metrics to CSV files using Windows Performance Monitor Data Collector Sets to troubleshoot system slowness.

Read More
Contact Qatar Airways Customer Service: Phone Number, Help Center, and More

Resolve urgent Qatar Airways reservation issues like flight changes and baggage claims using the US phone number +1801-855-5905 or online self-service tools.

Read More
Windows 11: Alt Codes Displaying Wrong Characters - Solutions

Resolve Windows 11 Alt codes showing wrong characters by verifying the US keyboard layout and enabling Num Lock.

Read More
Run Programs with Elevated Privileges: A Comprehensive Guide

Eliminates the need to type sudo for frequent administrative tasks by configuring .bashrc aliases or functions.

Read More
Dynamically Changing Dates in Excel Formulas Using Cells

Eliminate manual date updates in Excel by using cell references to create dynamic formulas that automatically adjust calculations when input dates change.

Read More
Granting Edit Access to a Specific Excel Sheet in an Office 365 User Email ID-Based Login

Excel Online lacks native sheet-level permissions, so users must split workbooks or use worksheet protection to isolate edit access for specific tabs.

Read More
Creating Network Load on Local Wi-Fi from One PC

Generate sustained Wi-Fi bandwidth load from a single PC using a VM SFTP server to test router stability and throughput.

Read More
Changing the Default Editor for Batch Files in Windows 11's File Explorer

Resolve the issue of batch files opening in Notepad by changing the default editor to a preferred application like VS Code.

Read More
Gain WiFi Connection Minutes Before Losing it by Changing MAC Address

Bypass MAC address filtering to restore WiFi connectivity temporarily when a device is blocked by network administrators.

Read More
Photos Folders Turned Black: Troubleshooting Picture Applications on Windows

Resolve black screens in Windows Photos by resetting the app, updating graphics drivers, and repairing system files.

Read More
Troubleshooting High CPU Temperature Values: A Step-by-Step Guide

Resolve high CPU temperatures and thermal throttling by monitoring with Speedfan, cleaning dust from cooling components, and replacing degraded thermal paste.

Read More
Make cURL establish TLS connection with CA unknown

Resolve cURL TLS connection failures with unknown or self-signed certificates by using the --insecure flag to bypass CA validation.

Read More
Troubleshooting Incorrect Network Metrics Values in Grafana, Prometheus, InfluxDB, and Telegraf

Fix incorrect network metrics in Grafana, Prometheus, InfluxDB, and Telegraf by verifying interface selection, resolving unit mismatches, and handling counter resets.

Read More
Start Another Terminal Window (cmd.exe) Windows Repair/Troubleshoot

Provides step-by-step instructions to access the Windows Command Prompt via bootable media for advanced system repair and troubleshooting.

Read More
Thinkpad P1 Gen 6: Sudden Thunderbolt 3 Dock USB-C Charging Stopped Working

Resolve sudden Thunderbolt 3 dock USB-C charging and internet failure on ThinkPad P1 Gen 6 by updating firmware, resetting the dock, and adjusting power settings.

Read More
ASUS Windows 11 Laptop: Internet Connection Issue with Hotspot

Resolve ASUS Windows 11 laptop spinning wheel issue when connecting to mobile hotspot by resetting network stack, disabling IPv6, and adjusting power settings.

Read More
Developing iOS Project with Firebase: Logging in and Sending Push Notifications

Integrates Firebase to enable secure user authentication and push notifications in iOS applications.

Read More
Troubleshooting Bash Script with Suspected Issues of Spaces, Dashes, Filenames and Quoting

Resolve Bash script failures caused by word splitting, globbing, and special characters in filenames by applying proper quoting techniques.

Read More
Populating OneDrive Folder for Local Backup without Affecting Remote Files

Prevent OneDrive from deleting remote files during Windows reinstallation by unlinking the account or using symbolic links to isolate local data.

Read More
Force First Frame as Keyframe Without Re-encoding: A Quick Solution

Resolve inaccurate seeking and playback glitches by re-encoding video to ensure the first frame is a valid keyframe.

Read More
Find Information in Database Using WSL (Ubuntu) on Windows-10

Resolve database connection issues from WSL Ubuntu on Windows 10 by configuring client tools and network access to query remote or local servers.

Read More
Configuring a New Router with Different Networks: One Family, One Guest

Resolve IP conflicts and isolate guest traffic by configuring a second router with a distinct subnet via its WAN port.

Read More
Quickly Open Multiple Stock Websites with a Single Command

Solve the problem of manually opening multiple stock research websites by creating a single command to launch them simultaneously on Windows, macOS, or Linux.

Read More
Improved Adobe Acrobat Search Experience: Access Advanced Search with Ease

Access advanced search filters like case sensitivity and regex in Adobe Acrobat by clicking More Options in the Find bar.

Read More
Port Forwarding VM via OpenVPN: A Comprehensive Guide

Configure OpenVPN server and iptables to forward specific ports from VPN clients to a virtual machine's internal IP address.

Read More
Understanding Partitions in the 1980s: A Look Back at MS-DOS and Master Boot Record

Explains how the Master Boot Record and partition table enabled MS-DOS to manage multiple disk volumes on a single physical drive.

Read More
Windows 10 Enterprise: Keyboard Not Detected in Managed Organization with Admin Privileges

Resolve Windows 10 Enterprise keyboard detection failures caused by Group Policy restrictions, driver corruption, or USB enumeration errors.

Read More
Can't Find x86_64 Versions of Applications on MacOS arm64 (M1)

Resolve missing x86_64 app issues on M1 Macs by installing Rosetta 2 and reinstalling apps as universal binaries.

Read More
How to Hide Installation Source for an Android App

Manage Android app installation source visibility by using USB transfers or file managers to reduce browser traces and isolate data via work profiles.

Read More
Connecting Momentus 4200.2 ST9808210A Hard Drive via USB Cable

Resolve inability to access Seagate Momentus 4200.2 ST9808210A hard drive by connecting it via USB using a compatible SATA-to-USB adapter and configuring the disk in Windows.

Read More