Azure IoT Edge: Failed to fetch container registry authentication token
See original GitHub issueRequired Information
I’m trying to deploy an Azure IoT Edge module through Azure Pipelines. I’ve set up my build steps as below but it’s returning an error message on the Push module images
step
Question, Bug, or Feature?
Type: Bug
Enter Task Name: AzureIoTEdge
Environment
-
Server - Azure Pipelines
-
Agent - Hosted
Issue Description
Below is a copy of my pipeline. I have a service connection set up under the name containerregistry
trigger:
- master
pool:
vmImage: 'Ubuntu-16.04'
variables:
solution: '**/*.sln'
buildPlatform: 'Any CPU'
buildConfiguration: 'Release'
steps:
- task: AzureIoTEdge@2
inputs:
action: 'Build module images'
templateFilePath: 'deployment.template.json'
defaultPlatform: 'arm32v7'
- task: AzureIoTEdge@2
inputs:
action: 'Push module images'
containerregistrytype: 'Generic Container Registry'
dockerRegistryConnection: 'containerregistry'
templateFilePath: 'deployment.template.json'
defaultPlatform: 'arm32v7'
fillRegistryCredential: 'true'
Task logs
##[section]Starting: AzureIoTEdge
==============================================================================
Task : Azure IoT Edge
Description : Build and deploy an Azure IoT Edge image
Version : 2.3.0
Author : Microsoft Corporation
Help : https://docs.microsoft.com/azure/devops/pipelines/tasks/build/azure-iot-edge
==============================================================================
Pushing module images...
29177abd-9970-4ff3-a171-cf8cb6824915 exists true
##[error]Error: Failed to fetch container registry authentication token, please check you container registry setting in build task. The username for container registry is
##[section]Finishing: AzureIoTEdge
Error logs
[error]Error: Failed to fetch container registry authentication token, please check you container registry setting in build task. The username for container registry is
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:15 (3 by maintainers)
Top Results From Across the Web
Troubleshoot login to registry - Azure Container Registry
Check Docker configuration · Specify correct registry name · Confirm credentials to access registry · Confirm credentials are authorized to access ...
Read more >Troubleshoot Azure IoT Edge common errors
Resolve common issues encountered when using an IoT Edge solution. ... A container fails to run, and the edgeAgent logs report a 403...
Read more >Troubleshooting Azure IoT Hub error codes
Understand how to fix errors reported by Azure IoT Hub. ... If for some reason you don't have access to the error message...
Read more >Deploy a connected registry to an IoT Edge device
Use Azure CLI commands and Azure portal to deploy a connected Azure container registry to an Azure IoT Edge device.
Read more >Permissions to repositories in Azure Container Registry
Scenarios for creating a token include: Allow IoT devices with individual tokens to pull an image from a repository; Provide an external ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@charlie-haley Can you share a sample of deployment.template.json and folder structure for your project? Something in your deployment.template.json should be inconsistent with your folder structure, so the task failed to figure out images need to be pushed (just imagine there’s a dummy module in your project, which won’t be built in your pipeline). I can share how to adjust the deployment.template.json or your folder structure.
I got the same problem. @prativen @blackchoey any progress on this issue so far?