Difference between revisions of "Reforking the GitLab Project"
From Eigen
(Created page with "Due to a technical issue that occurred on October 2, 2021, all GitLab fork relationships to the main [https://gitlab.com/libeigen/eigen Eigen project] created before that date...") |
m (Cantonios moved page Reforking to Reforking the GitLab Repo) |
(No difference)
|
Revision as of 22:03, 14 October 2021
Due to a technical issue that occurred on October 2, 2021, all GitLab fork relationships to the main Eigen project created before that date have been severed. This will prevent users from creating new MRs from these severed forks, and from reopening old ones.
Fortunately, there is a way via the GitLab API to re-establish the fork connection.
- Create a personal access token (documentation)
- Navigate to https://gitlab.com/-/profile/personal_access_tokens?name=refork&scopes=api
- Click the button: 'Create personal access token'
- Copy the token at the top of the screen.
- Determine your local project's ID.
- Navigate to your fork's main page (e.g. https://gitlab.com/cantonios/eigen)
- Note the project ID number directly under the project name (e.g. 17989470)
- Use the GitLab REST API to delete the existing broken fork relationship, and re-add it.
Bash:
export PRIVATE_TOKEN=Jk6S1gE8ryA8fy3zgtsj # <-- Replace with your token. export PROJECT_ID=17989470 # <-- Replace with your Project ID. export EIGEN_PROJECT_ID=15462818 # Delete existing fork. curl -H "PRIVATE-TOKEN: $PRIVATE_TOKEN" -X DELETE \ https://gitlab.com/api/v4/projects/$PROJECT_ID/fork # Re-establish fork. curl -H "PRIVATE-TOKEN: $PRIVATE_TOKEN" -X POST \ https://gitlab.com/api/v4/projects/$PROJECT_ID/fork/$EIGEN_PROJECT_ID
Windows Command Prompt:
:: # Replace PRIVATE_TOKEN and PROJECT_ID with your values. set PRIVATE_TOKEN=Jk6S1gE8ryA8fy3zgtsj set PROJECT_ID=17989470 set EIGEN_PROJECT_ID=15462818 :: # Delete existing fork. curl -H "PRIVATE-TOKEN: %PRIVATE_TOKEN%" -X DELETE ^ https://gitlab.com/api/v4/projects/%PROJECT_ID%/fork :: # Re-establish fork. curl -H "PRIVATE-TOKEN: %PRIVATE_TOKEN%" -X POST ^ https://gitlab.com/api/v4/projects/%PROJECT_ID%/fork/%EIGEN_PROJECT_ID%
Windows Powershell
$PRIVATE_TOKEN="Jk6S1gE8ryA8fy3zgtsj" # <-- Replace with your token (in quotes). $PROJECT_ID=17989470 # <-- Replace with your Project ID. $EIGEN_PROJECT_ID=15462818 # Delete existing fork. curl -H "PRIVATE-TOKEN: $PRIVATE_TOKEN" -X DELETE ` https://gitlab.com/api/v4/projects/$PROJECT_ID/fork # Re-establish fork. curl -H "PRIVATE-TOKEN: $PRIVATE_TOKEN" -X POST ` https://gitlab.com/api/v4/projects/$PROJECT_ID/fork/$EIGEN_PROJECT_ID