7

这是迄今为止的成绩单:

$ 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
4

2 回答 2

4

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

[url "git@github.com:"]
  insteadOf = https://github.com/
于 2020-06-06T22:08:43.997 回答
1

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

如果是这样,您在使用 JSch aka jsch#129时可能会遇到“无效的私钥”中描述的问题。

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

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

于 2020-01-27T19:13:35.577 回答