Once bitten, twice shy: Why my docker-compose build keeps having problems with my azure devops artifacts feed

In a previous blogpost I explained how to setup a docker build which allows to connect to an authorized Azure Devops Artifacts feed. I often use this feed, as it contains packages which we don’t want to share in public. However, almost every single time when I start fiddling around with my private feed, things break. Badly:

Response status code does not indicate success: 401 (Unauthorized).

Although I was pretty sure that the FEED_ACCESSTOKEN, which is required for correct authentication, was correctly set in my environment file, the docker-build still falled back to an old value.

Emptying the cache, deleting images: nothing helped. It appeared that I had set the environment variable for this same FEED_ACCESSTOKEN on system-level as well. Apparently, the global environment variable takes precedence over the locally set variable.

Two solutions are possible here:

  • run $env:FEED_ACCESSTOKEN =”” before you run your actual build
  • simply delete the FEED_ACCESSTOKEN from your environment variables.

Thanks for reading another episode of “Once bitten, twice shy.”

2 thoughts on “Once bitten, twice shy: Why my docker-compose build keeps having problems with my azure devops artifacts feed

  1. Pingback: Top Stories from the Microsoft DevOps Community – 2021.02.19 - Microsoft Today

  2. Pingback: Top Stories from the Microsoft DevOps Community – 2021.02.19 - Power Community

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.