Git通过ftps克隆 [英] Git clone over ftps

查看:156
本文介绍了Git通过ftps克隆的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

好。所以我有我的网站托管在InmotionHosting。这是一个共享服务器,所以ssh不在。我一直在通过FTPS访问它。我在工作中使用git,所以我一直很好奇开始使用git作为我的个人网站。只有问题,我不确定如何使用git连接到我当前的网站。我知道它与ftps兼容,因为它在手册中,但是出现错误:

无法连接到[我的网站]
couldn 't解析主机'
致命:HTTP请求失败
访问[我的网站] / info / refs时出错



我试过了:
$ b $ 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] ​​

有什么我失踪?我需要在服务器上安装一些东西吗?任何帮助表示赞赏。谢谢!

解决方案

> man git-clone



结果为:

  GIT URLS 
通常,URL包含有关传输协议,远程服务器地址和存储库路径的信息。
根据传输协议,有些信息可能不存在。

Git本身支持ssh,git,http,https,ftp,ftps和rsync协议。可以使用以下语法:

·ssh:// [user @] host.xz [:port] /path/to/repo.git/

·git://host.xz [:port] /path/to/repo.git/

·http [s]://host.xz [:port] / path / to / repo .git /

·ftp [s]://host.xz [:port] /path/to/repo.git/
$ b $ FTPS似乎是允许的协议之一。
$ b

尝试 git clone ftps: //host.xz[:port]/path/to/repo.git /


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!

解决方案

> man git-clone

results in:

GIT URLS
       In general, URLs contain information about the transport protocol, the address of the remote server, and the path to the repository.
       Depending on the transport protocol, some of this information may be absent.

       Git natively supports ssh, git, http, https, ftp, ftps, and rsync protocols. The following syntaxes may be used with them:

       ·   ssh://[user@]host.xz[:port]/path/to/repo.git/

       ·   git://host.xz[:port]/path/to/repo.git/

       ·   http[s]://host.xz[:port]/path/to/repo.git/

       ·   ftp[s]://host.xz[:port]/path/to/repo.git/

FTPS seems to be one of the allowed protocols.

Try git clone ftps://host.xz[:port]/path/to/repo.git/

这篇关于Git通过ftps克隆的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆