【问题标题】:SSH : git special repositorySSH : git 特殊存储库
【发布时间】:2018-08-27 17:18:40
【问题描述】:

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

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

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

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

感谢您的帮助。

【问题讨论】:

  • 我正在使用 docker 和 docker-compose

标签: git ssh


【解决方案1】:

你没有使用配置文件只是因为你的 git repo 不使用端口 22。

您仍然可以使用remote add 进行正常操作

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

【讨论】:

  • > 你没有使用配置文件只是因为你的 git repo 不使用端口 22。不,我可以用 www-data 用户写入!
猜你喜欢
  • 2013-03-22
  • 2017-08-07
  • 1970-01-01
  • 1970-01-01
  • 2019-09-30
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2014-10-19
相关资源
最近更新 更多