Reputation: 509
I try to setup diffusion to host my existing git repo, and just as a mirror to it.
I use Diffusion -> new repository -> Create a New Hosted Repository -> ... -> Configure More Options First
Then I add a mirror in Mirrors in More Options to my existing git remote repo, and activate the diffusion repo.
After a couple of time, all the branches in my remote repo are removed!
And the daemon.log says:
[/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://[email protected]/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]
I am just confused what to do. I accidentally setup one repo of mine successfully but cannot setup the others.
What is the right way to do so ?
Upvotes: 0
Views: 2544
Reputation: 509
For anyone may encounter this problem, the simplest way to do this is to init the git bare repo yourself in /var/repo
, using the same directory name in phabricator (the Callsign).
Then create the corresponding diffusion in the phabricator using the Callsign. Phabricator will then import the existing repo.
Upvotes: 1