如何正确设置phabricator扩散镜像我的git repo

时间:2015-07-04 05:23:03

标签: git phabricator

我尝试设置扩散来托管我现有的git repo,就像它的镜像一样。

我使用Diffusion - >新存储库 - >创建一个新的托管存储库 - > ... - >首先配置更多选项

然后我将镜像更多选项中的镜像添加到我现有的git远程仓库中,并激活扩散仓库。

几次之后,我的远程仓库中的所有分支都被删除了!

daemon.log说:

 [/opt/phabricator/src/applications/repository/daemon/PhabricatorRepositoryPullLocalDaemon.php:374]
[04-Jul-2015 13:18:14 Asia/Shanghai] [2015-07-04 13:18:14] PHLOG: 'Unexpected output while updating repository "r
TEST": [2015-07-04 13:18:14] EXCEPTION: (PhutilProxyException) Error while pushing "TEST" repository to mirrors.
{>} (PhutilAggregateException) Exceptions occurred while mirroring the "TEST" repository.
    - CommandException: Command failed with error #1!
      COMMAND
      git push --verbose --mirror -- 'xxxxx'

      STDOUT
      (empty)

      STDERR
      Pushing to https://xxxxx@git.oschina.net/onefi/treehole-game.git
      POST git-receive-pack (158 bytes)
      remote: error: By default, deleting the current branch is denied, because the next
      remote: error: 'git clone' won't result in any file checked out, causing confusion.
      remote: error:
      remote: error: You can set 'receive.denyDeleteCurrent' configuration variable to
      remote: error: 'warn' or 'ignore' in the remote repository to allow deleting the
      remote: error: current branch, with or without a warning message.
  ...' at [/opt/phabricator/src/applications/repository/daemon/PhabricatorRepositoryPullLocalDaemon.php:374]

我很困惑该怎么做。我不小心成功地设置了一个我的回购,但无法设置其他回购。

这样做的正确方法是什么?

1 个答案:

答案 0 :(得分:1)

对于任何人都可能遇到这个问题,最简单的方法是在/var/repo中使用phabricator(Callsign)中相同的目录名自己初始化git bare repo。

然后使用Callsign在phabricator中创建相应的扩散。然后Phabricator将导入现有的仓库。

相关问题