在ubuntu上设置Mercurial服务器 [英] Set up a mercurial server on ubuntu

查看:180
本文介绍了在ubuntu上设置Mercurial服务器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是水银新手.这里的问题是基本的,但是在谷歌搜索后我感到非常困惑.

I am new to mercurial. Here the question is basic, but I am very confused after googling.

我正在单独编程,我的控制器已安装在本地计算机(ubuntu 11.04)上,并且运行良好.现在,我想在服务器上保留一个存储库,以便可以在对我有利的时候进行推送和拉取.我想使用SSH,但不希望使用任何Web服务器.是否有可能?我已经在服务器上安装了mercurial-server,但是下一步是什么?如何设置远程存储库以及如何推入和拉出代码?确实需要帮助.谢谢.

I am programming individually, I have my mercurial installed on local machine (ubuntu 11.04), it is working well. Now I would like to keep a repository on a server, such that I can push and pull whenever good for me. I would like to use SSH and prefer not using any web servers. Is it possible? I have installed the mercurial-server on the server, but what is next? How to setup a remote repository and how to push and pull codes? Help needed indeed. Thanks.

推荐答案

您可以通过多种方法在服务器上发布Mercurial存储库.您可以在专用的Wiki页面上找到详细信息:发布Mercurial存储库

You have various way to publish a Mercurial repository on a server. You can find detailed information on the dedicated wiki page: Publishing Mercurial Repositories

在您的情况下,由于只希望具有SSH访问权限,因此以下步骤就足够了:

In your case, since you want only have SSH access, the following steps should be enough:

  1. 将实际的本地存储库复制到服务器上的某个位置(包括您的.hg目录).例如,您可以使用 scp .
  2. 将复制的存储库克隆回本地计算机:

  1. Copy your actual local repository somewhere on your server (including your .hg directory). You can use scp for example.
  2. Clone the copied repository back to your local machine:

hg clone ssh://myhostname.com//path/to/directory

  • 您现在可以从服务器中推/拉.

  • You can now push/pull from your server.

    很显然,您需要对服务器的SSH访问.

    Obviously, you need SSH access to your server.

    还要注意主机名后面的双精度/,这是完全正常的,必须将两者都放入.第一个是终止"主机名部分,第二个是指示路径始于远程文件系统的根.

    Also note the double / after the hostname, this is perfectly normal and you must put them both. The first one is to "terminate" the hostname part and the second one is to indicate that the path start at the root of the distant filesystem.

    如果您想授予其他人访问权限,请务必查看如何处理多个提交者正确配置访问权限.

    If you want to give access to other people, be sure to have a look at How To Handle Multiple Committers to configure the access rights correctly.

    这篇关于在ubuntu上设置Mercurial服务器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

  • 查看全文
    登录 关闭
    扫码关注1秒登录
    发送“验证码”获取 | 15天全站免登陆