通过 ftps 进行 Git 克隆
好的。所以我将我的网站托管在 InmotionHosting 上。这是一个共享服务器,所以 ssh 已经被淘汰了。我一直通过 FTPS 访问它。我在工作中使用 git,所以我很好奇开始在我的个人网站上使用 git。唯一的问题是,我不确定如何使用 git 连接到我当前的站点。我知道它与 ftps 兼容,因为它在手册中,但我收到错误:
“无法连接到 [我的网站]” “无法解析主机” “致命:HTTP 请求失败” “访问[我的站点]/info/refs时出错”
我尝试过:
git clone [用户名]:[pass]@[站点] [本地存储库]
git clone [用户名]@[站点] [本地存储库]
git clone [用户名]@[站点]:[来自 cpanel 的端口] [本地存储库]
git clone [用户名]%40[站点]@[站点] [本地存储库]
没有任何效果。我有什么遗漏的吗?我需要在服务器上安装一些东西吗?任何帮助表示赞赏。谢谢!
Okay. So I have my site hosted on InmotionHosting. It's a shared server, so ssh is out. I've been accessing it via FTPS. I use git at work, so I've been curious to start using git for my personal site. Only issue, I'm unsure of how to connect to my current site using git. I know it's compatible with ftps, since it's in the manual, but I get the error:
"failed to connect to [my site]"
"couldn't resolve host"
"fatal: HTTP request failed"
"error while accessing [my site]/info/refs"
I've tried:
git clone [username]:[pass]@[site] [local repository]
git clone [username]@[site] [local repository]
git clone [username]@[site]:[port from cpanel] [local repository]
git clone [username]%40[site]@[site] [local repository]
Nothing works. Is there something I'm missing? Do I need to install something on the server? Any help is appreciated. Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
<代码>> man git-clone
结果:
FTPS 似乎是允许的协议之一。
尝试 git clone ftps://host.xz[:port]/path/to/repo.git/
> man git-clone
results in:
FTPS seems to be one of the allowed protocols.
Try
git clone ftps://host.xz[:port]/path/to/repo.git/
我认为你错过了一个步骤。在“克隆”存储库之前,存储库本身必须存在(已初始化)。尝试克隆服务器上不是 git 存储库的目录将会失败。
I think you're missing a step. Before you can "clone" a repository, the repository itself must exist (be initialized). Trying to clone a directory on your server that isn't a git repository will fail.