gpt4 book ai didi

git - key_load_public : No such file or directory even though file exists

转载 作者:行者123 更新时间:2023-12-04 10:43:19 25 4
gpt4 key购买 nike

我正在尝试连接到 Bitbucket 服务器。我的机器有 Windows,有 Git Bash。

/h/.ssh/id_rsa/h/.ssh/id_rsa.pub ,我有存储库的 key 。
也在 /h/.ssh/config ,我有存储库的配置:

Host my-repo-name
User my-user
Hostname my-repo.com
Port 7999
IdentityFile id_rsa

当我尝试像这样连接到存储库时:
ssh -Tv git@my-repo.com

我收到这条消息:
OpenSSH_7.1p2, OpenSSL 1.0.2h  3 May 2016
debug1: Reading configuration data /h//.ssh/config
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Connecting to my-repo.com port 22.
debug1: Connection established.
debug1: identity file /h/.ssh/id_rsa type 1
debug1: key_load_public: No such file or directory

这里有两件事我不明白:

1.如果我有 /h/.ssh/id_rsa/h/.ssh/id_rsa.pub ,为什么我会收到 key_load_public: No such file or directory ?

2.如果在配置中我指定 Port 7999 ,为什么它连接到端口 22 Connecting to my-repo.com port 22 ?

最佳答案

  1. If I have /h/.ssh/id_rsa and /h/.ssh/id_rsa.pub, why am I getting key_load_public: No such file or directory?


这只是虚假警告。如果您使用更详细的日志级别运行,可以找到更多信息 -vvv .

  1. If in the configuration I specify Port 7999, why does it connect to port 22 Connecting to my-repo.com port 22?


因为 Port 7999仅针对主机 my-repo-name 进行隔离,不适用于 my-repo.com您尝试连接的位置。如果你跑,它会被使用
ssh -Tv git@my-repo-name

关于git - key_load_public : No such file or directory even though file exists,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42906366/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com