eclipse - 认证失败 : invalid password or missing SSH Key while import project in eclipse docker container

标签 eclipse git docker

我的操作系统:ubuntu 16.04 eclipse 4.0 docker image

在从 Git 导入项目 -> 时,出现错误:

ssh://... Auth Failed: invalid password or missing ssh key



我正在分享本地.ssh带有容器的文件夹,使用 -v /Users/name/.ssh:/root/.ssh:ro并且可以在没有Docker的主机上成功导入eclipse上的项目。

知道为什么会发生此错误吗?

[更新]

我可以在通过 Docker 容器中的 shell 登录后从命令行克隆。

我认为问题可能是 Windows->Preferences->General->Network Connections-> SSH2 [Authentication Methods],尝试仅选择公钥 |保存/重述 Eclipse 后,密码和其他组合都会引发相同的错误。我确实看到在网络设置中正确填充了 key 等 -> ssh2 选项卡。

最佳答案

首先,确保在容器内运行的 Eclipse 以 root 的形式运行。 .
因为 SSH URL 会在 ~/.ssh 中查找其 key 。 , 并且容器的/root/.ssh 填充了您的共享文件,而不是 ~<auser>/.ssh .

其次,检查您的 SSH key 是否受密码保护(这意味着您需要在运行 SSH 的主机上使用 ssh-agent 来缓存密码)

关于eclipse - 认证失败 : invalid password or missing SSH Key while import project in eclipse docker container,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60180898/

相关文章:

mysql - 如何使用正在运行的 MySQL 构建 Docker 容器?

docker - 使用 ansible-playbook 安装 docker-compose 时出错

spring-boot - Spring Boot 和 ELK

java - Selenium 和 Eclipse_java 以及 firefox 测试问题

android - 如何在 Android 中获取 html 源代码?

java - 将项目移动到 GIT 后,Eclipse java 构建速度变慢

wordpress - WordPress、Node、GitLab 和 CLI 的用户管理系统

java - CDI Beans 模块部署失败 - 部署 web 应用程序时出现 LifecycleException

java - SWT下的Swing组件可以加速吗?

ios - 使用 github 的 Github 命令行 vs. Xcode vs. Git 应用程序?