Git克隆在ftps上

时间:2011-04-18 21:34:05

标签: git https ftps

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

“无法连接到[我的网站]” “无法解决主持人” “致命:HTTP请求失败” “访问[我的网站] / info / refs”时出错

我试过了:

git clone [username]:[pass] @ [site] [local repository] ​​

git clone [username] @ [site] [local repository] ​​

git clone [username] @ [site]:[来自cpanel的端口] [本地存储库]

git clone [username]%40 [site] @ [site] [local repository] ​​

没有任何作用。有什么我想念的吗?我需要在服务器上安装一些东西吗?任何帮助表示赞赏。谢谢!

2 个答案:

答案 0 :(得分:5)

> man git-clone

结果:

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似乎是允许的协议之一。

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

答案 1 :(得分:2)

我认为你错过了一步。在您“克隆”存储库之前,存储库本身必须存在(被初始化)。尝试克隆服务器上不是git存储库的目录将失败。