git push origin main kex_exchange_identification: Connection closed by remote host Connection closed by 198.18.0.21 port 22 fatal: Could not read from remote repository.
Please make sure you have the correct access rights and the repository exists.
解决
之前在win上遇到过这个问题,通过修改ssh的config文件解决了。
在终端输入:
1
code ~/.ssh/config
在vscode中打开,
1
Include ~/.orbstack/ssh/config
发现仅有一行导入orbstack的配置的信息,需要添加github的配置:
1 2 3 4
Host github.com Hostname ssh.github.com Port 443 User git