如何设置 Mercurial 的本地存储库
这是完整的场景:
- 主存储库:
http://10.0.1.8:8000/ptest
- 我将其克隆到主机
10.1.0.115
的文件夹/ 中LOCAL-REPO
然后,使用命令
hgserve -p 9900 -d --webdir-conf hgwebconfig
发布它,hgwebconfig
文件具有< /p> <前><代码>[路径] ptest = /LOCAL_REPO/ptest [网络] 风格 = gitweb
现在包含在同一主机 10.0.1.115 上,我创建一个单独的文件夹 /QA
并执行以下操作:
hg clone http://10.0.1.115:9900/ptest
并获取所有文件,现在我想进行更改并将它们推送到存储库 http://10.0.1.115:9900/ptest
使用命令
hg push ssh://10.0.1.115//??/ptest
我不知道 ??
的正确值是什么。所以问题是:
- 如何设置用户/密码以将更改推送到
10.0.1.115
上的此存储库? - 在这种情况下,正确的语法是什么?
当我尝试推送更改时,出现错误:
hg push ssh://[email protected]/ptest
[email protected]'s password:
remote: abort: There is no Mercurial repository here (.hg not found)!
abort: no suitable response from remote hg!
here is the complete scenario:
- Main repository:
http://10.0.1.8:8000/ptest
- I clone it at host
10.1.0.115
, in the folder/LOCAL-REPO
Then, publish it using the command
hg serve -p 9900 -d --webdir-conf hgwebconfig
with thehgwebconfig
file having[paths] ptest = /LOCAL_REPO/ptest [web] style = gitweb
now, on the same host 10.0.1.115, i create a seperate folder /QA
and do:
hg clone http://10.0.1.115:9900/ptest
and get all the files, now i want to make changes and push them to the repo onhttp://10.0.1.115:9900/ptest
using the command
hg push ssh://10.0.1.115//??/ptest
I don't know what the correct value would be for ??
. So the questions are:
- How do i setup a user/password to push changes to this repo on
10.0.1.115
? - what is the corect syntax in this case?
When I try to push the changes I get error:
hg push ssh://[email protected]/ptest
[email protected]'s password:
remote: abort: There is no Mercurial repository here (.hg not found)!
abort: no suitable response from remote hg!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
当你通过 http:// 拉取时,你真的需要通过 ssh:// 推送吗?
hg clone http://10.0.1.115:9900/ptest
克隆你之后也应该能够通过 http 推送它,例如hg push http://10.0.1.115:9900/ ptest
但如果你真的需要通过 ssh 推送,那就是:你必须让你的存储库可以在本地帐户下访问,例如,如果用户是
hg
并且它的 homedir 是/home/hg
并且您的存储库将位于/home/hg/repository
目录中,然后您将能够通过命令访问它:用户/密码将与 ssh 相同到用户
hg
。Do you really need to push via ssh:// when you pulled via http:// ?
After
hg clone http://10.0.1.115:9900/ptest
clone you should be able to push it via http as well, likehg push http://10.0.1.115:9900/ptest
But if you really need to push via ssh here it is: you must have your repository accessible under local account, e.g. if user is
hg
and it's homedir is/home/hg
and you will have your repo in/home/hg/repository
directory then you will be able to access it via command:User/password will be same as to ssh onto user
hg
.