git - SSH : git 特殊存储库
问题描述
我为 Grav CMS 编写了一个插件,用于与 git 同步页面。我的 git 存储库是自托管的,没有使用 SSH 端口 22。
我想通过 ssh 配置文件。我知道我可以使用
git config core.sshCommand
我尝试这个但似乎不起作用我收到一个错误(on git push
):
ssh:连接到主机 git.netime.fr 端口 22:连接被拒绝”致命:无法从远程存储库读取。
谢谢你的帮助。
解决方案
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
推荐阅读
- movesense - Movesense HelloWorld 订阅
- node.js - 在 Bot Builder 中从 URL 解析 XML 数据
- python - 在python中对一组数据执行数学运算
- python - 无法在kivy中显示进度条
- javascript - 从现有数组创建动态数组?
- vuejs2 - Element-ui $emit 在确认对话框中无效
- c - 如何在链表中按 CPU 时间对节点进行排序,因为它们被放在 CPU 调度模拟 C 程序(SJF)中的“队列”中?
- scheme - 在 Scheme (Fluent) 中用变量或循环替换数字不起作用
- java - EditText 检查是否有关键字
- apache-flink - 使用 Table API 或 SQL 的 Apache Flink Tumbling Window 时间偏移