【问题标题】:Auth fail when running `sbt new`运行`sbt new`时验证失败
【发布时间】:2020-04-19 19:41:43
【问题描述】:

这是目前的成绩单:

$ sbt new lagom/lagom-scala.g8
[info] Loading global plugins from /Users/abrahma/.sbt/1.0/plugins
[info] Set current project to lagomlife (in build file:/Users/abrahma/Bitbucket/Practice-Scala/LagomLife/)
[info] Set current project to lagomlife (in build file:/Users/abrahma/Bitbucket/Practice-Scala/LagomLife/)

ssh://git@github.com/lagom/lagom-scala.g8.git: Auth fail

我已通过以下方式验证身份验证 GitHub:

$ ssh -T git@github.com
Hi agam! You've successfully authenticated, but GitHub does not provide shell access.

还验证了我可以访问有问题的存储库(即我可以在单独的位置执行以下操作):

git clone ssh://git@github.com/lagom/lagom-scala.g8.git

编辑: fwiw 我能够解决这里的根本原因:

git clone ssh://git@github.com/lagom/lagom-scala.g8.git
g8 file:///Users/abrahma/tmp/lagom-scala.g8

【问题讨论】:

    标签: sbt giter8


    【解决方案1】:

    我也遇到了这个问题,并通过从我的 ~/.gitconfig 中删除以下内容来解决它:

    [url "git@github.com:"]
      insteadOf = https://github.com/
    

    【讨论】:

    • 这对我有用,只是烦人,因为我必须将它添加到我的 .gitconfig 文件中才能让其他 Go 进程正常工作。
    【解决方案2】:

    您使用的是 OpenSSH 7.8 或更高版本,并且您最近是否创建了私钥?

    如果是这样,您可能会遇到“Invalid privatekey” when using JSch aka jsch#129 中描述的问题。

    发现根本原因是 ssh 私钥不匹配。

    如果这是您看到的错误,问题有一个解决方法,可以将密钥文件转换为旧格式。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2021-07-30
      • 1970-01-01
      • 2014-06-15
      • 2019-11-04
      • 2017-05-09
      • 2018-04-06
      • 1970-01-01
      相关资源
      最近更新 更多