我是一名分支办公室工作人员,已将我现有的仓库上传到我公司中央办公室的ftp服务器。中央办公室正在使用微软的ftp服务器。我无权在服务器上安装任何东西,只能使用支持主动模式ftp的真实ftp客户端连接/浏览到ftp服务器。
我尝试使用以下命令行进行克隆:
git clone ftp://companyDomain\username@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://companyDomain\username@ftp.company.com/project.repo/.git/info/refs
致命:HTTP请求失败
输入上述命令后,我会立即收到提示输入密码的提示。我输入密码,过了一段时间,然后我收到了上面的错误信息。
要完全清楚我不打算将我的源头版本推送到FTP服务器进行部署,所以像git-ftp,https://github.com/resmo/git-ftp这样的东西根本无法帮助我。我想要做的是在ftp服务器上拥有我的repo,我的小团队中的每个人都能够在ftp服务器上推送/获取对repo的更改。
git是否支持主动FTP? 发生了什么事?
谢谢, 克里斯
答案 0 :(得分:8)
他们使用默认的FTP端口吗?如果他们不这样做,你需要声明它:
git clone ftp://username:password@ftp.company.com:PORTHERE/project.repo/.git
答案 1 :(得分:0)
尝试
git clone ftp://username:password@ftp.company.com/project.repo/.git
答案 2 :(得分:0)
我在这里尝试了所有的FTP示例,没有一个正常工作。由于我的服务器pc是linux机器,我在其上安装了git,然后可以克隆使用:
git clone username:servername:/folder1/folder2/repoFolder.git
然后会要求您输入密码。 如果服务器上没有安装git,您将获得:
sh: git-upload-pack: not found
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.