简体   繁体   English

通过SSH设置远程GIT存储库? (无代码访问远程位置)

[英]Setup remote GIT repository via SSH? (No code access to the remote location)

I have a remote location I want to use as GIT repository. 我有一个远程位置要用作GIT存储库。 I have SSH access to that location and can copy files there. 我可以通过SSH访问该位置,并且可以在该位置复制文件。 I can't install or run the GIT executables on the remote location. 我无法在远程位置上安装或运行GIT可执行文件。 Can I (and how) use it as the GIT repository for my team? 我可以(以及如何)将其用作团队的GIT存储库吗?

That is impossible to implement. 那是不可能实现的。 A Git repository requires a server-side Git suite. Git存储库需要服务器端Git套件。

On the other hand, if it's possible to provide an NFS or CIFS share, you could keep a Git repository on such a share — it would be acted upon by your local Git instance. 另一方面,如果可以提供NFSCIFS共享,则可以在此共享上保留一个Git存储库-本地Git实例将对它进行操作。 Not that I like this approach though... 不过我并不是喜欢这种方法...

I have a similar problem. 我有一个类似的问题。 I found a palliative solution: 我找到了治标不治本的解决方案:

  • Use SSHFS and Fuse to mount the remote location through ssh as a network drive; 使用SSHFSFuse通过ssh将远程位置挂载为网络驱动器;
  • The people having direct read/write access (me) clone the git repository with its local path; 具有直接读/写访问权限(me)的人员会使用本地路径克隆git存储库;
  • Other people clone the repo with an http access. 其他人使用http访问权限克隆存储库。

It's not very efficient but it works. 它不是很有效,但是可以。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM