I have this repository that I'd like to share but not necessarily by putting it on github or other Git hosting providers.
My website is hosted at a provider (OVH) which only gives ftp access, no ssh or shell available.
My question is: is it possible to make a read-only git repository available with this provider, only using http?
If yes, how? And then, wha开发者_StackOverflow社区t would be the command to issue if I want to clone this repo back to my desktop?
Thanks!
Update:
See also the Git Book - Setting up a public repository:
All you need to do is place the newly created bare git repository in a directory that is exported by the web server, and make some adjustments to give web clients some extra information they need:
$ mv proj.git /home/you/public_html/proj.git $ cd proj.git $ git --bare update-server-info $ chmod a+x hooks/post-update
Advertise the URL of proj.git. Anybody else should then be able to clone or pull from that URL, for example with a command line like:
$ git clone http://yourserver.com/~you/proj.git
It should work by just creating a bare git repository and put it in your webspace. git can handle http
URLs. See git-clone
:
In general, URLs contain information about the transport protocol, the address of the remote server, and the path to the repository. Depending on the transport protocol, some of this information may be absent.
Git natively supports ssh, git, http, https, ftp, ftps, and rsync protocols. The following syntaxes may be used with them:
ssh://[user@]host.xz[:port]/path/to/repo.git/
git://host.xz[:port]/path/to/repo.git/
http[s]://host.xz[:port]/path/to/repo.git/
ftp[s]://host.xz[:port]/path/to/repo.git/
rsync://host.xz/path/to/repo.git/
Maybe gitweb can help you.
Perhaps this would help:
- Git - DreamHost explains how to host Git repositories on Dreamhost account
(advanced, no helpdesk support) - Setting up git over WebDAV...
They are quite old, but hopefully not outdated.
精彩评论