通过 ftps 进行 Git 克隆

发布于 2024-11-02 00:47:55 字数 494 浏览 1 评论 0原文

好的。所以我将我的网站托管在 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

丢了幸福的猪 2024-11-09 00:47:55

<代码>> 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/

> 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/

嘿咻 2024-11-09 00:47:55

我认为你错过了一个步骤。在“克隆”存储库之前,存储库本身必须存在(已初始化)。尝试克隆服务器上不是 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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文