I want to use an Elixir app hosted on a private git as a dependency on another project,
I added it to mix.exs as
[{:my_app, git: "http://mygit.com/My_App.git"}]
mix deps.get fetches it successfully, but when I try to compile I get the following error
Unchecked dependencies for environment dev:
my_app (http://mygit.com/My_App.git)
lock mismatch: the dependency is out of date (run “mix deps.get” to fetch locked version)
** (Mix) Can’t continue due to errors on dependencies
Manually cloning the git repo and pointing to the local folder as
I tried deleting _build, deps & mix.lock and still had the same problem. I guess the problem had something to do with my
private git repo, because the problem went away when I hosted the package on github.
Can you get to the address youre providing in mix.exs through website incognito mode, or curl, but without actually loging in anywhere? If not, mix won’t be able neither. If you have private repo on github, you can download it providing credentials lieke this: {:mylib, git: "https://login:password@github.com/user/repo.git"} At least it work’s that way in Ruby, don’t have any private repo though to test it now
yeah it did need a username/password and I had them set as environment variables and didn’t think authentication was an issue since mix deps.get was able to fetch the package, but entering the actual credentials in the mix file fixed the lock mismatch problem