InfoGrab DocsInfoGrab Docs

프로젝트 가져오기 및 내보내기 문제 해결

요약

가져오기 또는 내보내기에 문제가 있으면 Rake 태스크로 디버그 모드를 활성화합니다. 그런 다음 개별 오류 메시지에 대한 아래 내용을 확인합니다. username 이 유효하지 않습니다. namespace_path가 존재하지 않습니다.

가져오기 또는 내보내기에 문제가 있으면 Rake 태스크로 디버그 모드를 활성화합니다.

# Import
IMPORT_DEBUG=true gitlab-rake "gitlab:import_export:import[root, group/subgroup, testingprojectimport, /path/to/file_to_import.tar.gz]"

# Export
EXPORT_DEBUG=true gitlab-rake "gitlab:import_export:export[root, group/subgroup, projectnametoexport, /tmp/export_file.tar.gz]"

그런 다음 개별 오류 메시지에 대한 아래 내용을 확인합니다.

Exception: undefined method 'name' for nil:NilClass#

username 이 유효하지 않습니다.

Exception: undefined method 'full_path' for nil:NilClass#

namespace_path가 존재하지 않습니다. 예를 들어 그룹 또는 하위 그룹 중 하나의 철자가 틀렸거나 누락되었거나, 경로에 프로젝트 이름을 지정한 경우입니다.

이 태스크는 프로젝트만 생성합니다. 새 그룹 또는 하위 그룹으로 가져오려면 해당 그룹을 먼저 생성합니다.

Exception: No such file or directory @ rb_sysopen - (filename)#

archive_path에 지정한 프로젝트 내보내기 파일이 없습니다.

Exception: Permission denied @ rb_sysopen - (filename)#

지정한 프로젝트 내보내기 파일에 git 사용자가 접근할 수 없습니다.

문제를 해결하려면 다음 단계를 수행합니다.

  1. 파일 소유자를 git:git으로 설정합니다.
  2. 파일 권한을 0400으로 변경합니다.
  3. 파일을 공개 폴더(예: /tmp/)로 이동합니다.

Name can contain only letters, digits, emoji ...#

Name can contain only letters, digits, emoji, '_', '.', '+', dashes, or spaces. It must start with a letter,
digit, emoji, or '_', and Path can contain only letters, digits, '_', '-', or '.'. It cannot start
with '-', end in '.git', or end in '.atom'.

project_path에 지정한 프로젝트 이름이 위에 명시된 이유 중 하나로 유효하지 않습니다.

project_path에는 프로젝트 이름만 입력합니다. 예를 들어 하위 그룹이 포함된 경로를 입력하면 /가 프로젝트 이름에 쓸 수 없는 문자이므로 이 오류와 함께 실패합니다.

Name has already been taken and Path has already been taken#

같은 이름의 프로젝트가 이미 존재합니다.

Exception: Error importing repository into (namespace) - No space left on device#

디스크 공간이 부족하여 가져오기를 완료할 수 없습니다.

가져오기 중에 tarball은 구성된 shared_path 디렉터리에 캐시됩니다. 캐시된 tarball과 디스크에 압축 해제된 프로젝트 파일을 모두 수용할 만큼 디스크에 여유 공간이 있는지 확인합니다.

Total number of not imported relations: XX 메시지와 함께 가져오기 성공#

Total number of not imported relations: XX 메시지가 표시되고 가져오기 중에 이슈가 생성되지 않으면 exceptions_json.log를 확인합니다. N is out of range for ActiveModel::Type::Integer with limit 4 bytes와 같은 오류가 표시될 수 있으며, 여기서 N은 4바이트 정수 한도를 초과하는 정수입니다. 이 경우 이슈의 relative_position 필드 리밸런싱 문제에 해당할 가능성이 높습니다.

# Check the current maximum value of relative_position
Issue.where(project_id: Project.find(ID).root_namespace.all_projects).maximum(:relative_position)

# Run the rebalancing process and check if the maximum value of relative_position has changed
Issues::RelativePositionRebalancingService.new(Project.find(ID).root_namespace.all_projects).execute
Issue.where(project_id: Project.find(ID).root_namespace.all_projects).maximum(:relative_position)

가져오기를 다시 시도하여 이슈가 정상적으로 가져와졌는지 확인합니다.

가져오기 시 Gitaly 호출 오류#

개발 환경으로 대규모 프로젝트를 가져오면 Gitaly에서 호출 횟수가 너무 많다는 오류가 발생할 수 있습니다. 예를 들면 다음과 같습니다.

Error importing repository into qa-perf-testing/gitlabhq - GitalyClient#call called 31 times from single request. Potential n+1?

이 오류는 개발 환경의 n+1 호출 한도 때문에 발생합니다. 이 오류를 해결하려면 환경 변수로 GITALY_DISABLE_REQUEST_LIMITS=1을 설정합니다. 그런 다음 개발 환경을 재시작하고 다시 가져옵니다.

프로젝트 가져오기 및 내보내기 문제 해결

GitLab v19.5
원문 보기

요약

가져오기 또는 내보내기에 문제가 있으면 Rake 태스크로 디버그 모드를 활성화합니다. 그런 다음 개별 오류 메시지에 대한 아래 내용을 확인합니다. username 이 유효하지 않습니다. namespace_path가 존재하지 않습니다.

가져오기 또는 내보내기에 문제가 있으면 Rake 태스크로 디버그 모드를 활성화합니다.

# Import
IMPORT_DEBUG=true gitlab-rake "gitlab:import_export:import[root, group/subgroup, testingprojectimport, /path/to/file_to_import.tar.gz]"

# Export
EXPORT_DEBUG=true gitlab-rake "gitlab:import_export:export[root, group/subgroup, projectnametoexport, /tmp/export_file.tar.gz]"

그런 다음 개별 오류 메시지에 대한 아래 내용을 확인합니다.

Exception: undefined method 'name' for nil:NilClass#

username 이 유효하지 않습니다.

Exception: undefined method 'full_path' for nil:NilClass#

namespace_path가 존재하지 않습니다. 예를 들어 그룹 또는 하위 그룹 중 하나의 철자가 틀렸거나 누락되었거나, 경로에 프로젝트 이름을 지정한 경우입니다.

이 태스크는 프로젝트만 생성합니다. 새 그룹 또는 하위 그룹으로 가져오려면 해당 그룹을 먼저 생성합니다.

Exception: No such file or directory @ rb_sysopen - (filename)#

archive_path에 지정한 프로젝트 내보내기 파일이 없습니다.

Exception: Permission denied @ rb_sysopen - (filename)#

지정한 프로젝트 내보내기 파일에 git 사용자가 접근할 수 없습니다.

문제를 해결하려면 다음 단계를 수행합니다.

  1. 파일 소유자를 git:git으로 설정합니다.
  2. 파일 권한을 0400으로 변경합니다.
  3. 파일을 공개 폴더(예: /tmp/)로 이동합니다.

Name can contain only letters, digits, emoji ...#

Name can contain only letters, digits, emoji, '_', '.', '+', dashes, or spaces. It must start with a letter,
digit, emoji, or '_', and Path can contain only letters, digits, '_', '-', or '.'. It cannot start
with '-', end in '.git', or end in '.atom'.

project_path에 지정한 프로젝트 이름이 위에 명시된 이유 중 하나로 유효하지 않습니다.

project_path에는 프로젝트 이름만 입력합니다. 예를 들어 하위 그룹이 포함된 경로를 입력하면 /가 프로젝트 이름에 쓸 수 없는 문자이므로 이 오류와 함께 실패합니다.

Name has already been taken and Path has already been taken#

같은 이름의 프로젝트가 이미 존재합니다.

Exception: Error importing repository into (namespace) - No space left on device#

디스크 공간이 부족하여 가져오기를 완료할 수 없습니다.

가져오기 중에 tarball은 구성된 shared_path 디렉터리에 캐시됩니다. 캐시된 tarball과 디스크에 압축 해제된 프로젝트 파일을 모두 수용할 만큼 디스크에 여유 공간이 있는지 확인합니다.

Total number of not imported relations: XX 메시지와 함께 가져오기 성공#

Total number of not imported relations: XX 메시지가 표시되고 가져오기 중에 이슈가 생성되지 않으면 exceptions_json.log를 확인합니다. N is out of range for ActiveModel::Type::Integer with limit 4 bytes와 같은 오류가 표시될 수 있으며, 여기서 N은 4바이트 정수 한도를 초과하는 정수입니다. 이 경우 이슈의 relative_position 필드 리밸런싱 문제에 해당할 가능성이 높습니다.

# Check the current maximum value of relative_position
Issue.where(project_id: Project.find(ID).root_namespace.all_projects).maximum(:relative_position)

# Run the rebalancing process and check if the maximum value of relative_position has changed
Issues::RelativePositionRebalancingService.new(Project.find(ID).root_namespace.all_projects).execute
Issue.where(project_id: Project.find(ID).root_namespace.all_projects).maximum(:relative_position)

가져오기를 다시 시도하여 이슈가 정상적으로 가져와졌는지 확인합니다.

가져오기 시 Gitaly 호출 오류#

개발 환경으로 대규모 프로젝트를 가져오면 Gitaly에서 호출 횟수가 너무 많다는 오류가 발생할 수 있습니다. 예를 들면 다음과 같습니다.

Error importing repository into qa-perf-testing/gitlabhq - GitalyClient#call called 31 times from single request. Potential n+1?

이 오류는 개발 환경의 n+1 호출 한도 때문에 발생합니다. 이 오류를 해결하려면 환경 변수로 GITALY_DISABLE_REQUEST_LIMITS=1을 설정합니다. 그런 다음 개발 환경을 재시작하고 다시 가져옵니다.