question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Azure IoT Edge: Failed to fetch container registry authentication token

See original GitHub issue

Required 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

image

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:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:15 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
blackchoeycommented, Jan 17, 2020

@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.

1reaction
robbertvanhovecommented, Dec 4, 2019

I got the same problem. @prativen @blackchoey any progress on this issue so far?

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found