提问人:coding4fun 提问时间:11/16/2023 更新时间:11/16/2023 访问量:32
SSH(配置文件)和 git clone 没有在正确的端口上连接?
ssh (config file) & git clone not connecting on the the right port?
问:
所以我在 22 号端口的位置似乎被封锁了。我更改了我的 ssh 配置文件(正如你所知道的,我一直在玩一点):
#Host ssh.github.com
# Hostname ssh.github.com
# Port 443
#Host github.com
# Hostname github.com
# Port 443
Host github.com
Hostname ssh.github.com
Port 443
当我执行以下操作时,它会按预期工作(以前我会得到连接超时):
ssh -T git@github.com
[email protected]: Permission denied (publickey).
但是当我做一个它仍然试图通过端口连接时:git clone
22
git clone [email protected]:<MyUser>/<MyRepo>.git
Cloning into '<MyRep>'...
ssh: connect to host github.com port 22: Connection timed out
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
有谁知道为什么它仍然使用 ?仅供参考,我正在使用Windows。port 22
git clone
答: 暂无答案
评论
ssh.github.com
github.com
github.com
ssh.github.com