Git 无法推送到 ftp-server
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/4315413/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Git fails to push to ftp-server
提问by Tornado
I've got some problem using git over ftp.
我在通过 ftp 使用 git 时遇到了一些问题。
What I've got right now:
我现在有什么:
- FTP Server, ready for active and passive FTP;
- Bare git repository, one commit
- FTP Server,准备主动和被动FTP;
- 裸 git 存储库,一次提交
The repository was created locally and then sent to the server. I had to use git update-server-info to make it work. Now I can clone into my new repository and execute pulls, but I cannot push. Everytime I try, git says:
存储库在本地创建,然后发送到服务器。我不得不使用 git update-server-info 使其工作。现在我可以克隆到我的新存储库并执行拉取,但我无法推送。每次我尝试时,git 都会说:
error: Cannot access URL ftp://f***@w*****/repo/, return code 3
fatal: git-http-push failed
error: Cannot access URL ftp://f***@w*****/repo/, return code 3
fatal: git-http-push failed
Can anyone please help me?
谁能帮帮我吗?
Greets Florian
问候弗洛里安
回答by VonC
Note: if your goal is to copy (deploy) files that have changed in your local repo to a ftp server then:
注意:如果您的目标是将本地存储库中已更改的文件复制(部署)到 ftp 服务器,则:
might be better suited for this task.
可能更适合这项任务。
As far as I know (as confirmed in this thread), there is no support yet for git push to ftp.
回答by Tornado
@VonC: Seems you're right, I talked so some GIT guys on IRC and they told me the same. FTP pull works, FTP push doesn't. But anyway, your confirmation thread is a possible solution to my problem, as I can use webdrive/netdrive (and curlftpfs on linux) to make git think the remote repository is a local folder. This is the only solution I see at the moment.
@VonC:看来你是对的,我在 IRC 上和一些 GIT 人谈过,他们告诉我同样的情况。FTP 拉有效,FTP 推送无效。但无论如何,您的确认线程是我问题的可能解决方案,因为我可以使用 webdrive/netdrive(以及 linux 上的 curlftpfs)让 git 认为远程存储库是本地文件夹。这是我目前看到的唯一解决方案。
Thank you!
谢谢!