简体   繁体   English

Git,WebDAV和基本的网络托管

[英]Git, WebDAV, and basic web hosting

I have a basic web hosting account through GoDaddy. 我有一个通过GoDaddy的基本网络托管帐户。 It has plenty of space, and I was curious if I could use it as a push/pull/clone point. 它有足够的空间,我很好奇,如果我可以用它作为推/拉/克隆点。

I've read that Git supports HTTP(S) operations through WebDAV, but I've never used it. 我已经读过Git通过WebDAV支持HTTP(S)操作,但我从未使用它。 I'm not that familiar with WebDAV in general or how it works. 我不太熟悉WebDAV或它是如何工作的。

Is it possible to setup this sort of limited server to work with Git? 是否可以设置这种有限的服务器与Git一起使用? I do not have SSH access on my account, but I do have permissions to config some basic .htaccess settings. 我的帐户没有SSH访问权限,但我确实有权配置一些基本的.htaccess设置。

There's two ways of hosting a git-repo on an http-server: 有两种方法可以在http服务器上托管git-repo:

  • "smart" HTTP, where you need a cgi-script installed on the server. “智能”HTTP,您需要在服务器上安装cgi脚本。 This will probably not work for you, as basic web-hosting usually don't allow user-scripts. 这可能不适合您,因为基本的Web托管通常不允许用户脚本。
  • "dumb" HTTP, which is simply maintained by uploading the repo to the web-host. “哑”HTTP,只需将回购上传到网络主机即可维护。 This would probably work for you. 这可能对你有用。

"dumb" HTTP is a bit more awkward to use for the person who pushes to it, but it JustWorks(tm) for those who pulls from it. “愚蠢的”HTTP对于推动它的人来说有点尴尬,但对于那些从中汲取它的人来说,JustWorks(tm)。 The pusher needs to run "git update-server-info" on the repo, and somehow get the repository over to the server (in the same way you'd usually upload files). 推送器需要在repo上运行“git update-server-info”,并以某种方式将存储库传送到服务器(与您通常上传文件的方式相同)。

See the Git Book for details: http://book.git-scm.com/4_setting_up_a_public_repository.html 有关详细信息,请参阅Git Book: http//book.git-scm.com/4_setting_up_a_public_repository.html

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

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