简体   繁体   中英

Git, WebDAV, and basic web hosting

I have a basic web hosting account through 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. I'm not that familiar with WebDAV in general or how it works.

Is it possible to setup this sort of limited server to work with Git? I do not have SSH access on my account, but I do have permissions to config some basic .htaccess settings.

There's two ways of hosting a git-repo on an http-server:

  • "smart" HTTP, where you need a cgi-script installed on the server. This will probably not work for you, as basic web-hosting usually don't allow user-scripts.
  • "dumb" HTTP, which is simply maintained by uploading the repo to the web-host. 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. 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).

See the Git Book for details: http://book.git-scm.com/4_setting_up_a_public_repository.html

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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