Can you show your Dockerfile? It is possible you have to force rebuild your Docker image so that it fetches the latest Hex version, if you add mix hex.info to the Dockerfile you can verify that it uses the latest Hex version 0.18.1.
Please verify that you are using the latest hex version with mix hex.info. I see that you are using a mirror when installing hex, maybe it is slow to refresh?
just a wild guess, is this output from inside docker container or your local computer? Because your docker file says FROM registry-hlj.helijia.com/hlj-elixir:1.6.4, but above is 1.6.5
There is something may help.
I got this error in the branch with Dockerfile, Then check out to master branch deps.get still got error.
But when I change to another phoenix project, deps.get works.
I back home, use another computer (also use latest hex) , no error. This computed has no access to registry-hlj.helijia.com so I can’t try build docker.
And I try rm -rf the project then clone it again. Not work.
It is possible that you use a version manager such as asdf? If that’s the case it could switch between Elixir versions and you would get another installed Hex version. This might be the case because the output you have shown shows different Elixir versions (1.6.4 and 1.6.5). Run mix local.hex again in the project where you see the crash to ensure you have the latest Hex version installed for the Elixir version your project uses.
Very sorry for misleading.
I’m not use asdf or other version manager. 1.6.4 elixir is my MBP from company and 1.6.5 is home MBP.
Sorry…
Now I’m sure I use the 0.18.1 version of hex.
Is there some setting (httpc or other) bind up with project not branch or computer? Because as I mentioned before: same computer same environment phoenix project one deps.get work another can’t. And in the error project, I checkout branch to master it still error. I think this will be the only entry point I fix this.
After I compare two mix.exs file from difference project finally find out {:sso_login, ">= 0.0.0", organization: "helijia"} the organization deps is the key.
When I remove it, no error!!
So the reason are in those commands in the iTerm2 history
I am using nix and the local hex version is 2.0.x and phx_new version is the latest 1.17.x.
after do mix local.hex, the hex version is now latest 2.1.1, and everything works.