【发布时间】:2021-07-28 16:54:34
【问题描述】:
- 我已经使用 ssh-keygen 命令为用户“devuser”生成了 ssh 密钥
- 生成私钥和公钥后,我已将公钥添加到项目的bitbucket中的Access Keys列表中
- 当我尝试从 bitbucket 克隆 repo 时,出现以下错误
git clone ssh://git@host.fqdn.net:6999/dev-project/test-repo.git
Cloning into 'test-repo'...
ssh: Could not resolve hostname /home/devuser/.ssh2/id_rsa_2048_b: Name or service not known
fatal: Could not read from remote repository.
请确保您拥有正确的访问权限 并且存储库存在。
当我为同一主机上的不同用户尝试相同的步骤时,对我来说效果很好。感谢任何指针
【问题讨论】:
-
您的
~/.ssh/config文件中是否有任何内容(尤其是与host.fqdn.net相关的条目)? -
ssh -vT git@host.fqdn.net:6999 输出是什么?
-
OpenSSH_7.4p1,OpenSSL 1.0.2k-fips 2017 年 1 月 26 日调试 1:读取配置数据 /etc/ssh/ssh_config 调试 1:/etc/ssh/ssh_config 第 66 行:应用选项 * debug1:连接到 host.fqdn.net [53.124.43.134] 端口 22。debug1:连接到地址 53.124.43.134 端口 22:连接被拒绝 ssh:连接到主机 host.fqdn.net 端口 22:连接被拒绝
标签: linux git ssh version-control bitbucket