Search code examples
elixirphoenix-frameworkelixir-mix

Unable to deploy a website which has a github dependency in "mix.exs"


There's a dependency from github directly. It's not my repository. It's on github.

defp deps do
    [{:something123, git: "git@github.com:user123/something123.git"}

On localhost it's working well. However, on a server when I'm deploying it, throws a exception:

* Updating something123 (git@github.com:user123/something123.git)
Host key verification failed.
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
** (Mix) Command "git --git-dir=.git fetch --force --quiet --progress" failed

What rights? Again, that repository isn't mine.

The code of this website I'm deploying is on github too, in someone's repository. It's all been well regarding deploying so far unit I added that dependency from github.


Solution

  • Try changing to the built-in github syntax:

     {:something123, github: "user123/something123"}