git remote add 与其他 SSH 端口

标签 git ssh port

在 Git 中,当我的主机使用不同的 SSH 端口时,如何添加远程源服务器?

git remote add origin ssh://user@host/srv/git/example

最佳答案

你可以这样做:

git remote add origin ssh://user@host:1234/srv/git/example

1234 是正在使用的 ssh 端口

关于git remote add 与其他 SSH 端口,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3596260/

相关文章:

git - 在 jenkins 中为 git 存储库配置端口

java - 与 Java 的 SSH 连接

mysql客户端端口

objective-c - 从 Obj-C 将 iOS 应用程序移植到 Mac/Mac Ruby?

git - 使用 fetch 而不是 push 备份 git 存储库

git - 将本地 git 存储库重置为远程的存储库?

windows - Windows 上的 Git fetch 在开始之前等待

git - 使用 Github for Windows 发布到多个远程

java - JSCH依次执行并打印命令输出

Tomcat : How to redirect external ip address access to an other location