apt-get update failing with "Conflicting distribution" error

I have a GitHub Action workflow that runs an apt-get update. The job’s runs-on is ubuntu-18.04. I get an error like this:

Reading package lists...
W: Conflicting distribution: https://packages.microsoft.com/ubuntu/16.04/prod xenial InRelease (expected xenial but got stable)
E: Repository 'https://packages.microsoft.com/ubuntu/16.04/prod xenial InRelease' changed its 'Origin' value from 'microsoft-ubuntu-xenial-prod xenial' to 'vscode stable'
E: Repository 'https://packages.microsoft.com/ubuntu/16.04/prod xenial InRelease' changed its 'Label' value from 'microsoft-ubuntu-xenial-prod xenial' to 'vscode stable'
E: Repository 'https://packages.microsoft.com/ubuntu/16.04/prod xenial InRelease' changed its 'Suite' value from 'xenial' to 'stable'
E: Repository 'https://packages.microsoft.com/ubuntu/16.04/prod xenial InRelease' changed its 'Codename' value from 'xenial' to 'stable'

This isn’t a repository I added as part of the action, and the workflow worked a couple days ago. Did something change with GitHub Actions that I need to account for?


Have this problem too, workflow was fine yesterday.

1 Like

/me too

Problem started about 2h ago.

I see the same problem too https://github.com/kubernetes/minikube/pull/6723/checks?check_run_id=459207826

I also have the same problem

Browsing the package index it’s complaining about, it looks like something was pushed today by microsoft: https://packages.microsoft.com/ubuntu/16.04/prod/dists/xenial/

I also face this problem !! 

Also facing the same issue!

Aslo getting this error, my docker builds are failing :frowning:

Also running into this issue, seems to be a problem with the microsoft repos that are included by default with github actions. This should hopefully be solved soon. It seems to happen every so often with the microsoft repos, last time i had a sync error message from one of their repos and had to rerun the action at a later time.

There is an issue with a xenial reference being included in the microsoft-prod list. You can work around it with the following step at the start of any job that involves an apt-get update:

- name: Fix broken apt list
 if: matrix == null || matrix.os == 'ubuntu-latest' || matrix.os == 'ubuntu-18.04' run: sudo perl -p -i -e 's#16\.04/prod xenial#18.04/prod bionic#' /etc/apt/sources.list.d/microsoft-prod.list{,.save}

The problem seems to be solved, my workflow is now working again! 

1 Like

Looks like it is, my workflows are now completing.

@zombiezen ,

I noticed that some people replied the  apt-get update command has backed to work on their side. I also tested on my side and it also works fine on my side. Please check if it also back to work on your side.

I checked the blog for  GitHub Status , and found two recent reported service incidents, maybe this issue is related to these two service incidents.

I also have helped you report this issue to the appropriate engineering team, they will evaluate and investigate the issue. If they have any update, I will notify you in time.

Can confirm this has been fixed. Running my workflow again succeeded. Thank you!

Hm, I’ve restarted my job twice, just now, and I still see errors. Am I the only one?