GitHub 마이그레이션 문제 해결
실패한 프로세스, 누락된 접두사, 대형 프로젝트 오류를 포함한 GitHub 가져오기 문제를 해결합니다.
GitHub에서 GitLab으로 프로젝트를 가져올 때 다음 문제가 발생할 수 있습니다. 이전에 실패한 가져오기 프로세스 수동으로 계속하기 # 일부 경우 GitHub 가져오기 프로세스에서 저장소 가져오기에 실패할 수 있습니다. 이로 인해 GitLab이 프로젝트 가져오기 프로세스를 중단하고 저장소를 수동으로 가져와야 합니다. 관리자는 실패한 가져오기 프로세스에 대해 저장소를 수동으로 가져올 수 있습니다: Rails 콘솔을 엽니다. 콘솔에서 다음 일련의 명령을 실행합니다: project_id = < PROJECT_ID > github_access_token = < GITHUB_ACCESS_TOKEN > github_repository_path = '/' github_repository_url = "https:// #{github_access_token} @github.com/ #{github_repository_path} .git" # Find project by ID project = Project .find(project_id) # Set import URL and credentials project.import_url = github_repository_url project.import_type = 'github' project.import_source = github_repository_path project.save! # Create an import state if the project was created manually and not from a failed import project.create_import_state if project.import_state.blank? # Set state to start project.import_state.force_start # Optional: If your import had certain optional stages selected or a timeout strategy # set, you can reset them here. Below is an example. # The params follow the format documented in the API: # https://docs.gitlab.com/api/import/#import-repository-from-github Gitlab : :GithubImport : :Settings .new(project) .write( timeout_strategy: "optimistic" , optional_stages: { single_endpoint_issue_events_import: true , single_endpoint_notes_import: true , attachments_import: true , collaborators_import: true } ) # Trigger import from second step Gitlab : :GithubImport : :Stage : :ImportRepositor
