I’ve been trying to debug this half the day and am not getting anywhere. I’m trying to export a project with GitLab Rake and getting this output:
Input:
EXPORT_DEBUG=true gitlab-rake gitlab:import_export:export [‘root’, ‘group-path’, ‘project-path’, ‘project_exports/20240628_group_project.tar.gz’]
Response:
/opt/gitlab/embedded/lib/ruby/gems/2.7.0/gems/zeitwerk-2.5.4/lib/zeitwerk/kernel.rb:35: warning: ⛔️ WARNING: Sidekiq testing API enabled, but this is not the test environment. Your jobs will not go to Redis.
D, [2024-06-28T15:15:34.335955 #629] DEBUG — : User Load (2.2ms) /application:web,db_config_name:main/ SELECT “users”.* FROM “users” WHERE (1=0) LIMIT 1
**E, [2024-06-28T15:15:34.337484 #629] ERROR — : Exception: undefined method projects' for nil:NilClass** D, [2024-06-28T15:15:34.337563 #629] DEBUG -- : ["/opt/gitlab/embedded/service/gitlab-rails/lib/gitlab/import_export/project/export_task.rb:10:in initialize'", "/opt/gitlab/embedded/service/gitlab-rails/lib/tasks/gitlab/import_export/export.rake:28:in
new'”, “/opt/gitlab/embedded/service/gitlab-rails/lib/tasks/gitlab/import_export/export.rake:28:in block (3 levels) in <top (required)>'", "/opt/gitlab/embedded/lib/ruby/gems/2.7.0/gems/rake-13.0.6/lib/rake/task.rb:281:in
block in execute'”, “/opt/gitlab/embedded/lib/ruby/gems/2.7.0/gems/rake-13.0.6/lib/rake/task.rb:281:in each'", "/opt/gitlab/embedded/lib/ruby/gems/2.7.0/gems/rake-13.0.6/lib/rake/task.rb:281:in
execute'”, “/opt/gitlab/embedded/lib/ruby/gems/2.7.0/gems/rake-13.0.6/lib/rake/task.rb:219:in block in invoke_with_call_chain'", "/opt/gitlab/embedded/lib/ruby/gems/2.7.0/gems/rake-13.0.6/lib/rake/task.rb:199:in
synchronize'”, “/opt/gitlab/embedded/lib/ruby/gems/2.7.0/gems/rake-13.0.6/lib/rake/task.rb:199:in invoke_with_call_chain'", "/opt/gitlab/embedded/lib/ruby/gems/2.7.0/gems/rake-13.0.6/lib/rake/task.rb:188:in
invoke'”, “/opt/gitlab/embedded/lib/ruby/gems/2.7.0/gems/rake-13.0.6/lib/rake/application.rb:160:in invoke_task'", "/opt/gitlab/embedded/lib/ruby/gems/2.7.0/gems/rake-13.0.6/lib/rake/application.rb:116:in
block (2 levels) in top_level'”, “/opt/gitlab/embedded/lib/ruby/gems/2.7.0/gems/rake-13.0.6/lib/rake/application.rb:116:in each'", "/opt/gitlab/embedded/lib/ruby/gems/2.7.0/gems/rake-13.0.6/lib/rake/application.rb:116:in
block in top_level'”, “/opt/gitlab/embedded/lib/ruby/gems/2.7.0/gems/rake-13.0.6/lib/rake/application.rb:125:in run_with_threads'", "/opt/gitlab/embedded/lib/ruby/gems/2.7.0/gems/rake-13.0.6/lib/rake/application.rb:110:in
top_level'”, “/opt/gitlab/embedded/lib/ruby/gems/2.7.0/gems/rake-13.0.6/lib/rake/application.rb:83:in block in run'", "/opt/gitlab/embedded/lib/ruby/gems/2.7.0/gems/rake-13.0.6/lib/rake/application.rb:186:in
standard_exception_handling'”, “/opt/gitlab/embedded/lib/ruby/gems/2.7.0/gems/rake-13.0.6/lib/rake/application.rb:80:in run'", "/opt/gitlab/embedded/lib/ruby/gems/2.7.0/gems/rake-13.0.6/exe/rake:27:in
<top (required)>'”, “/opt/gitlab/embedded/bin/rake:23:in load'", "/opt/gitlab/embedded/bin/rake:23:in
<top (required)>'”, “/opt/gitlab/embedded/lib/ruby/site_ruby/2.7.0/bundler/cli/exec.rb:63:in load'", "/opt/gitlab/embedded/lib/ruby/site_ruby/2.7.0/bundler/cli/exec.rb:63:in
kernel_load'”, “/opt/gitlab/embedded/lib/ruby/site_ruby/2.7.0/bundler/cli/exec.rb:28:in run'", "/opt/gitlab/embedded/lib/ruby/site_ruby/2.7.0/bundler/cli.rb:476:in
exec'”, “/opt/gitlab/embedded/lib/ruby/site_ruby/2.7.0/bundler/vendor/thor/lib/thor/command.rb:27:in run'", "/opt/gitlab/embedded/lib/ruby/site_ruby/2.7.0/bundler/vendor/thor/lib/thor/invocation.rb:127:in
invoke_command'”, “/opt/gitlab/embedded/lib/ruby/site_ruby/2.7.0/bundler/vendor/thor/lib/thor.rb:399:in dispatch'", "/opt/gitlab/embedded/lib/ruby/site_ruby/2.7.0/bundler/cli.rb:30:in
dispatch'”, “/opt/gitlab/embedded/lib/ruby/site_ruby/2.7.0/bundler/vendor/thor/lib/thor/base.rb:476:in start'", "/opt/gitlab/embedded/lib/ruby/site_ruby/2.7.0/bundler/cli.rb:24:in
start'”, “/opt/gitlab/embedded/lib/ruby/gems/2.7.0/gems/bundler-2.1.4/exe/bundle:46:in block in <top (required)>'", "/opt/gitlab/embedded/lib/ruby/site_ruby/2.7.0/bundler/friendly_errors.rb:123:in
with_friendly_errors'”, “/opt/gitlab/embedded/lib/ruby/gems/2.7.0/gems/bundler-2.1.4/exe/bundle:34:in <top (required)>'", "/opt/gitlab/embedded/bin/bundle:23:in
load'”, “/opt/gitlab/embedded/bin/bundle:23:in <main>'"]
I’ve reviewed the [documentation](https://docs.gitlab.com/ee/administration/raketasks/project_import_export.html#::text=gitlab-rake%20%22gitlab:import_export,using%20the%20same%20Rake%20task 🙂 and searched the issue tracker, Reddit, and Google-fu. But I have yet to make any progress.