Janani Kripa
Janani Kripa

Reputation: 31

HG clone - abort : HTTP Error 403: Forbidden/empty destination path not valid

Basically, I'm trying to serve (hg serve) my local repository and clone the same.

When I gave "hg clone http://localhost:8000/" (the served URL), I got "abort: HTTP Error 403: Forbidden"

When I did "unset http_proxy", tried again, abort: empty destination path is not valid popped up!

Why does it happen? Are there any prerequisites to be done in hgrc or any config files before the cloning?

Upvotes: 1

Views: 4817

Answers (2)

Janani Kripa
Janani Kripa

Reputation: 31

hg clone http://localhost:8000/ .

Specifying the destination viz.current working directory(.) solved it.

Upvotes: 2

Ry4an Brase
Ry4an Brase

Reputation: 78330

There's no prior setup required:

(df)Ry4ans-MacBook-Air:www ry4an$ cd /tmp
(df)Ry4ans-MacBook-Air:tmp ry4an$ hg init janani ; cd janani ; hg serve &
[1] 22358
(df)Ry4ans-MacBook-Air:janani ry4an$ listening at http://Ry4ans-MacBook-Air.local:8000/ (bound to *:8000)

(df)Ry4ans-MacBook-Air:janani ry4an$ cd ..
(df)Ry4ans-MacBook-Air:tmp ry4an$ hg clone http://localhost:8000/ janani-clone
127.0.0.1 - - [24/Feb/2015 14:24:39] "GET /?cmd=capabilities HTTP/1.1" 200 -
127.0.0.1 - - [24/Feb/2015 14:24:39] "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks
127.0.0.1 - - [24/Feb/2015 14:24:39] "GET /?cmd=batch HTTP/1.1" 200 - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D
no changes found
127.0.0.1 - - [24/Feb/2015 14:24:39] "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=phases
updating to branch default
0 files updated, 0 files merged, 0 files removed, 0 files unresolved

Could it be that you already have a different server listening on port 8000, so your hg serve isn't getting the connections?

Upvotes: 0

Related Questions