一个简短的问题。我使用带有 openSSH 的 msysgit 作为 git 客户端。我不想使用其他 ssh 客户端,例如 putty。从 GIT Bash 我已经成功地连接到我的服务器 ssh -p XXXX 到我的服务器。
不幸的是,当我尝试做类似的事情时:
git clone git@SERVER:reponame.git
从 Git Bash 我得到:
ssh: connect to host SERVER port 22 failed.
如何使 msysgit 尝试使用 openssh 打开的 ssh 连接在不同的端口运行?
我知道在 linux 中这样的东西会在/etc/ssh/ssh_config 文件中,但在这种情况下我将如何去做呢?提前致谢。
最佳答案
git 支持 ssh://
ssh://[user@]host.xz[:port]/path/to/repo.git/
记下那里的端口。
关于windows - 在 Windows 中为 msysgit 设置 openssh 端口,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4581426/