Git仓库在FTP服务器上 [英] Git repository on ftp server

查看:186
本文介绍了Git仓库在FTP服务器上的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有ftp服务器,我无法安装其他软件。是否有可能创建它的git仓库和克隆到本地电脑?我试图创建本地存储库并将其复制到ftp。它会起作用吗?如何从ftp服务器进行克隆?

I have ftp server and I cannot install additional software on it. Is it possible to create on it git repository and clone to local pc? I tried to create local repository and copied it to ftp. Will it work? How can I clone from ftp server?

推荐答案

  • Git fails to push to ftp-server
  • Does GIT support push to an ftp server?

...它可能有一个适合你的情况的解决方案。

... which might have a solution that's suitable for your case.

你不会说你正在使用什么操作系统,但是如果它是基于Linux的我会尝试使用 FUSE 将FTP服务器安装为本地文件系统的一部分, a> + fuseftp 。如果您使用的是Mac OS,则可以尝试 MacFuse 。 (nb我从来没有试过fuseftp,我自己,所以我不能推荐或推荐它。)毫无疑问Windows也有相应的功能。

You don't say what operating system you're using, but if it's Linux-based what I would try is to mount the FTP server as part of your local filesystem with FUSE + fuseftp. If you're using Mac OS, you could similarly try MacFuse. (n.b. I've never tried fuseftp, myself, so I'm not in a position to recommend or disrecommend it.) No doubt there are equivalents for Windows as well.

那么你应该能够在挂载的目录下运行 git init --bare ,并从它中推拉它,因为它是一个本地库。您还应该启用示例后更新挂钩,以便在每次推送后运行 git update-server-info 否则当用 ftp:// 存储库URL与服务器交互时,人们会遇到问题。

Then you should just be able to run git init --bare in the mounted directory and push and pull from it as it it were a local repository. You should also enable the example post-update hook so that git update-server-info is run after each push - otherwise people will have problems when interacting with the server with an ftp:// repository URL.

这篇关于Git仓库在FTP服务器上的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆