首页 > 解决方案 > SSH : git 特殊存储库

问题描述

我为 Grav CMS 编写了一个插件,用于与 git 同步页面。我的 git 存储库是自托管的,没有使用 SSH 端口 22。

我想通过 ssh 配置文件。我知道我可以使用 git config core.sshCommand

我尝试这个但似乎不起作用我收到一个错误(on git push):

ssh:连接到主机 git.netime.fr 端口 22:连接被拒绝”致命:无法从远程存储库读取。

谢谢你的帮助。

标签: gitssh

解决方案


You don't have use the config file just because your git repo doesn't use port 22.

You can still do the normal way using remote add

git remote add origin ssh://git@example.com:22222/user/repo.git
git push origin master

推荐阅读