HG clone - abort:HTTP错误403:禁止/空目标路径无效

时间:2015-02-24 07:22:40

标签: mercurial clone abort

基本上,我试图为我的本地存储库服务(hg serve)并克隆它。

当我给出" hg clone http://localhost:8000/" (服务的URL),我得到了#34; abort:HTTP错误403:禁止"

当我做了"取消设置http_proxy",再次尝试时, abort:空目标路径无效弹出!

为什么会这样?在克隆之前,是否有任何先决条件要在hgrc或任何配置文件中完成?

2 个答案:

答案 0 :(得分:2)

hg clone http://localhost:8000/ .

指定目标viz.current工作目录(。)解决了它。

答案 1 :(得分:0)

无需事先安排:

(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

可能是因为您已经有另外一台服务器正在侦听端口8000,所以您的hg serve没有获得连接吗?