Reputation: 547
I can clone my project from a mercurial repository via SSH connection.
hg clone --debug ssh://[email protected]/mercurial/MyAndroidStudioProject
But I cannot clone this same project via HTTP connection.
hg clone --debug http://192.268.0.4:8888/MyAndroidStudioProject/
The process hangs after this log.
using http://192.268.0.4:8888/MyAndroidStudioProject/
sending capabilities command
destination directory: MyAndroidStudioProject
query 1; heads
sending batch command
requesting all changes
sending getbundle command
I can access this HTTP URL from a web browser but I cannot clone from terminal and AndroidStudio. May I know the root cause of this problem and how can I solve it? Thanks.
Upvotes: 0
Views: 263
Reputation: 50180
How are you serving your repository from the server? Sounds like you may be trying to access it over a regular Apache service, which will not Just Work. The server must be able to respond to mercurial-specific requests (like getbundle
in your log), which requires some setup from you.
The easiest way to serve a repo over HTTP: Use SSH to log on to your server, cd to your repo and type hg serve
. This is enough to clone over HTTP, though you probably don't want to leave it running long-term-- and it will only give you read-only access. For more functionality, see the section Serving over HTTP using CGI in the Mercurial book. It doesn't sound like a piece of cake, so my advice would be to find another way to get your job done.
The Mercurial book discusses your options in some detail in this chapter.
Upvotes: 1