You are browsing a read-only backup copy of Wikitech. The primary site can be found at wikitech.wikimedia.org

Toolsadmin.wikimedia.org/FAQ: Difference between revisions

From Wikitech-static
Jump to navigation Jump to search
imported>BryanDavis
(Start a FAQ/How To page)
 
imported>BryanDavis
 
(4 intermediate revisions by 3 users not shown)
Line 1: Line 1:
'''Frequently (un)asked questions''' about using the Tool Labs admin console
'''Frequently (un)asked questions''' about using the Toolforge admin console.


== Configure Diffusion to mirror a GitHub repo ==
== Configure Diffusion to mirror a GitHub repo ==
Line 5: Line 5:
# Go to new repository on Phabricator by following the "''browse repository on Phabricator''" link
# Go to new repository on Phabricator by following the "''browse repository on Phabricator''" link
# Click "''Manage Repository''" button
# Click "''Manage Repository''" button
# Click "''URIs''" section in right column
# Click "''URIs''" section in left column
# Click "''Add New URI''" button
# Click "''New URI''" button
#* '''URI''': enter the https URL to your "<nowiki>https://github.com/{OWNER}/{REPO}.git</nowiki>"
#* '''URI''': enter the https URL to your "<nowiki>https://github.com/{OWNER}/{REPO}.git</nowiki>"
#* '''I/O Type''': "Observe: Copy from a remote."
#* '''I/O Type''': "Observe: Copy from a remote."
#* '''Display Type''': "Visible: Show as a clone URI."
#* '''Display Type''': "Visible: Show as a clone URI."
# Click "Create Repository URI" button
# Click "Create Repository URI" button
Note: Currently only GitHub (and Gerrit) repositories are supported for mirroring, see [[phab:T143969]] for discussion about adding more hosts.
== Mirror a Diffusion repo to GitHub ==
# Create a repo on GitHub
# Grant a push bot write permissions to the GitHub repo.
#* This will be easiest if the repo is in the [https://github.com/wikimedia/ wikimedia] or [https://github.com/toolforge/ toolforge] organization. You should '''not''' store credentials for your personal GitHub account in Phabricator.
#* If the repo is in the toolforge organization, go to the "''Settings''" > "''Collaborators & teams''" tab and add the "''Push bots''" team with write permissions. This will grant the [https://github.com/toolforge-push Toolforge push bot] user push access.
#* If the repo is in the wikimedia organization, the [https://github.com/orgs/wikimedia/people/wmfphab Phabricator bot] user will automatically have push access.
# Go to the repository on Phabricator
# Click the "''Actions''" > "''Manage Repository''" menu item
# Click "''URIs''" section in left column
# Click "''New URI''" button
#* '''URI''': enter the https URL to your "<nowiki>https://github.com/{OWNER}/{REPO}.git</nowiki>"
#* '''I/O Type''': "Mirror: Push a copy to a remote."
#* '''Display Type''': "Visible: Show as a clone URI." or "Hidden: Do not show a clone URI."
# Click "''Create Repository URI''" button
# Click "''Set Credential''" menu item
# Choose the credentials for a push bot that can write to your GitHub repo
#* [https://github.com/toolforge/ toolforge] org: "''K33 GitHub - toolforge-push - password (2020-01-22)''"
#* [https://github.com/wikimedia/ wikimedia] org: "''K32 wmfphab github token''"

Latest revision as of 15:08, 5 May 2020

Frequently (un)asked questions about using the Toolforge admin console.

Configure Diffusion to mirror a GitHub repo

  1. Create Diffusion repository using toolsadmin.wikimedia.org
  2. Go to new repository on Phabricator by following the "browse repository on Phabricator" link
  3. Click "Manage Repository" button
  4. Click "URIs" section in left column
  5. Click "New URI" button
    • URI: enter the https URL to your "https://github.com/{OWNER}/{REPO}.git"
    • I/O Type: "Observe: Copy from a remote."
    • Display Type: "Visible: Show as a clone URI."
  6. Click "Create Repository URI" button

Note: Currently only GitHub (and Gerrit) repositories are supported for mirroring, see phab:T143969 for discussion about adding more hosts.

Mirror a Diffusion repo to GitHub

  1. Create a repo on GitHub
  2. Grant a push bot write permissions to the GitHub repo.
    • This will be easiest if the repo is in the wikimedia or toolforge organization. You should not store credentials for your personal GitHub account in Phabricator.
    • If the repo is in the toolforge organization, go to the "Settings" > "Collaborators & teams" tab and add the "Push bots" team with write permissions. This will grant the Toolforge push bot user push access.
    • If the repo is in the wikimedia organization, the Phabricator bot user will automatically have push access.
  3. Go to the repository on Phabricator
  4. Click the "Actions" > "Manage Repository" menu item
  5. Click "URIs" section in left column
  6. Click "New URI" button
    • URI: enter the https URL to your "https://github.com/{OWNER}/{REPO}.git"
    • I/O Type: "Mirror: Push a copy to a remote."
    • Display Type: "Visible: Show as a clone URI." or "Hidden: Do not show a clone URI."
  7. Click "Create Repository URI" button
  8. Click "Set Credential" menu item
  9. Choose the credentials for a push bot that can write to your GitHub repo
    • toolforge org: "K33 GitHub - toolforge-push - password (2020-01-22)"
    • wikimedia org: "K32 wmfphab github token"