【问题标题】:Unable to deploy a website which has a github dependency in "mix.exs"无法在“mix.exs”中部署具有 github 依赖项的网站
【发布时间】:2017-09-21 00:13:03
【问题描述】:

直接来自 github 的依赖。这不是我的存储库。在github上。

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

在本地主机上运行良好。但是,在我部署服务器时,会引发异常:

* 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

什么权利?同样,该存储库不是我的。

我正在部署的这个网站的代码也在 github 上,在某人的存储库中。到目前为止,部署单元一切都很好,我从 github 添加了该依赖项。

【问题讨论】:

  • 依赖是公共仓库还是私有仓库?
  • @MBuhot,公开

标签: elixir phoenix-framework elixir-mix


【解决方案1】:

尝试更改为内置的github 语法:

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

【讨论】:

  • 使用当前语法在 LOCALHOST 上运行良好!为什么不在服务器上?
  • 我觉得是git协议和HTTPS协议的区别。
  • 我可以用这个例子重现这个问题:{:phoenix_swagger, git: "git@github.com:xerions/phoenix_swagger.git"} 但是这个语法有效:{:phoenix_swagger, git: "git://github.com/xerions/phoenix_swagger.git"}
猜你喜欢
  • 2018-08-20
  • 2022-01-14
  • 2015-04-18
  • 2018-07-17
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2021-01-25
相关资源
最近更新 更多