t0xic0der/pagure-exporter

Simple exporter tool that helps migrate repository files, data assets and issue tickets from projects on Pagure to GitLab

Simple exporter tool that helps migrate repository files, data assets and issue tickets from projects on Pagure to GitLab

  • Using an internet browser of your choice, open up Pagure and login to your account.

  • Click on your profile display picture and then, head over to the Account Settings page.

  • Under the API Keys section, click on the Create new API key button in the top right corner.

  • As this is the source namespace, check all the ACLs that are required to read the asset information associated with a repository, set a safe expiration date for the API token and write an appropriate description for its usage before clicking on the Create button.

  • Make note of the API token generated and ensure that they are not shared with others or used for a different purpose.

  • Head over to a repository that the currently logged-in username has at least a READ access to.

  • Make note of the source namespace in the format of HOLDER/REPONAME where the HOLDER can be a group or a sole user. For example, in case of a repository located at https://pagure.io/fedora-infra/ansible - the source namespace would be fedora-infra/ansible.

  • In another internet browser tab or window, open up GitLab and login to your account.

  • Click on the New project/repository option from the sidebar of the profile page and then, click on the Create blank project option.

  • Create a new empty repository which will act as the destination for the asset transfer. It is recommended to have the same name as the source namespace to avoid confusion, but it is not strictly required.

  • Head over to the created repository and make note of the Project ID. For example in this case, it is 42823949 for the destination repository named gridhead/pagure-exporter-test.

  • Expand the sidebar to head over to the Access Tokens section from the Settings section.

  • In the Project Access Token page, click on the Add new token button to begin creating a new access token.

  • As this is the destination namespace, check all the scopes that are required to write the asset information associated with a repository, pick an appropriate role, set a safe expiration date and write an appropriate description for its usage before clicking on the Create project access token button.

  • Make note of the API token generated and ensure that they are not shared with others or used for a different purpose.

  • Ensure that you have the following information handy before proceeding to the next steps.

    1. Username of an account that has at least the READ permissions in the source namespace on Pagure (Say srceuser)
    2. Access token belonging to the aforementioned account with appropriate ACLs checked required for at least the READ permissions in the source namespace (Say srcecode)
    3. Name of the source namespace in the format HOLDER/REPONAME where the HOLDER can be a group or a sole user (Say srcerepo)
    4. Username of an account that has at least the WRITE permissions in the destination namespace on GitLab (Say destuser)
    5. Access token belonging to that aforementioned account appropriate roles and scopes required for at least the WRITE permissions in the destination namespace (Say destcode)
    6. Name of the destination namespace in the format of uniquely identifiable PROJECTID string (Say destrepo)
  • The following unofficial repositories are provided as-is by owner of this project. Contact the owner directly for bugs or issues (IE: not bugzilla).

    * Total number of packages downloaded in the last seven days.


    This is a companion discussion topic for the original entry at https://copr.fedorainfracloud.org/coprs/t0xic0der/pagure-exporter