Page MenuHomePhabricator

Diffusion mirroring to GitHub doesn't work for tool-spacemedia
Closed, ResolvedPublicBUG REPORT

Assigned To
Authored By
Don-vip
May 3 2020, 12:42 PM
Referenced Files
F31810460: image.png
May 9 2020, 11:18 PM
F31793541: image.png
May 3 2020, 12:42 PM
F31793545: image.png
May 3 2020, 12:42 PM
F31793519: image.png
May 3 2020, 12:42 PM

Description

I would like to mirror the Git repository hosted at https://phabricator.wikimedia.org/source/tool-spacemedia to https://github.com/toolforge

In a first step I tried to mirror it to a personal repo https://github.com/don-vip/tool-spacemedia by following URI documentation.

What I have done so far:

  1. Created a new SSH key
  2. Added the public key in my GitHub settings:
    image.png (131×745 px, 5 KB)
  3. Created a new mirror URI:
    image.png (109×517 px, 6 KB)
  4. Defined my private key and setup as credentials:
    image.png (184×600 px, 6 KB)
  5. Pushed several commits to my repository, waited 1 day, and nothing happens

Can someone please help me? I don't see what I have done wrong, and don't see any error in Diffusion logs.

Event Timeline

I would suggest creating an empty repo on github at https://github.com/don-vip/tools-spacemedia first. We have to do the same for gerrit replication

The docs don't exactly say that, but they kinda hint at it

Normally, you should only mirror to an empty repository.

While technically a "non existent" repo is technically empty, I wouldn't class it the same

@Reedy thank for the advice. I have pushed a commit to the GitHub repository so it now exists, but I still can't see anything happening there: https://github.com/don-vip/tool-spacemedia

Have you done any write/push actions to your diffusion repo?

We have not had good luck with ssh key based replication from Phabricator to GitHub in the past. I will setup the desired mirror and log what I did to do that here.

bd808 claimed this task.

Setting up a mirror to the https://github.com/toolforge org account:

  1. Created empty repo for https://github.com/toolforge/tool-spacemedia. Marked as "public".
  2. Granted the "toolforge/push-bots" group "maintain" access to the repository
  3. Added https://github.com/toolforge/tool-spacemedia.git as 'mirror' URI for https://phabricator.wikimedia.org/source/tool-spacemedia/
  4. Set credential K33 GitHub - toolforge-push - password (2020-01-22) for the https://github.com/toolforge/tool-spacemedia.git mirror URI
  5. Triggered the "Update Now" action for https://phabricator.wikimedia.org/source/tool-spacemedia/

https://github.com/toolforge/tool-spacemedia is alive!

I also invited https://github.com/don-vip to become a "maintainer" of the https://github.com/toolforge/tool-spacemedia mirror. The https://github.com/toolforge-push bot account will keep the repo in sync, so there really isn't much for @Don-vip to maintain here, but I think it will give them the ability to update the GitHub metadata on the repo as well as close pull requests that may come in.

I updated the docs at https://wikitech.wikimedia.org/wiki/Toolsadmin.wikimedia.org/FAQ#Mirror_a_Diffusion_repo_to_GitHub with various small changes that have happened over time for this (mostly switching from ssh transport to https transport).

@bd808 I'm missing many rights on my repository:

image.png (443×1 px, 22 KB)

In particular I cannot add any secrets. I want to define a new "SONAR_TOKEN" secret to use https://github.com/SonarSource/sonarcloud-github-action

In particular I cannot add any secrets. I want to define a new "SONAR_TOKEN" secret to use https://github.com/SonarSource/sonarcloud-github-action

I had you as a "maintainer" which does limit some rights. I just switched you to an "admin", which I think should let you do most things.

Thanks! I can setup secrets now :)