通过活动 FTP 克隆 git 存储库 [英] clone git repository via active FTP
问题描述
我是一名分支机构工作人员,已将我现有的 repo 上传到我公司中央办公室的 ftp 服务器.中央办公室使用微软的 ftp 服务器.我无权在服务器上安装任何东西,只能使用支持主动模式 ftp 的真实 ftp 客户端连接/浏览到 ftp 服务器.
I'm a branch office worker and have uploaded my existing repo to the ftp server at my company's central office. The central office is using Microsoft's ftp server. I have no access to install anything on the server and was only able to connect/browse to the ftp server using a real ftp client that supports active mode ftp.
我已尝试使用以下命令行进行克隆:
I have tried cloning with the following command lines:
git clone ftp://companyDomainusername@ftp.company.com/project.repo/.git
git clone ftp://username@company.com@ftp.company.com/project.repo/.git
git clone ftp://username%40company.com@ftp.company.com/project.repo/.git
git clone ftp://username:password@ftp.company.com/project.repo/.git
我收到以下错误消息:
错误:连接到 ftp.company.com:21
失败;访问时没有错误ftp://companyDomainusername@ftp.company.com/project.repo/.git/info/refs
致命:HTTP 请求失败
error: Failed connect to
ftp.company.com:21
; No error while accessingftp://companyDomainusername@ftp.company.com/project.repo/.git/info/refs
fatal: HTTP request failed
当输入上述命令时,我会立即收到输入密码的提示.我输入密码,过了一段时间,我收到了上面的错误信息.
When entering the above commands I immediately get prompted for my password. I enter the password, some time passes and then I received the above error message.
要完全清楚,我不希望将源代码的头部版本推送到 FTP 服务器进行部署,所以像 git-ftp、https://github.com/resmo/git-ftp,别帮我了.我想做的是在 ftp 服务器上拥有我的 repo,并且我这个非常小的团队中的每个人都能够推送/获取对 ftp 服务器上的 repo 的更改.
To be completely clear I'm am NOT looking to push the head version of my source to an FTP server for deployment, so things like git-ftp, https://github.com/resmo/git-ftp, don't help me out at all. What I want to do is have my repo on the ftp server and everyone on my very small team be able to push/fetch changes to the repo on the ftp server.
git 是否支持主动 FTP?怎么回事?
Does git support active FTP? What's going on?
谢谢,克里斯
推荐答案
他们使用默认的 FTP 端口吗?如果他们不这样做,您需要像这样声明它:
Do they use the default FTP port? If they don't, you need to declare it like so:
git clone ftp://username:password@ftp.company.com:PORTHERE/project.repo/.git
这篇关于通过活动 FTP 克隆 git 存储库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!