Bug in GitLab Rake task exporting project, getting filesystem errors

I’m trying to invoke the gitlab:import_export:export task with gitlab-rake. I specified the parameters for the task, but am experiencing a range of different errors during the export.

I even ran chmod git:git /root/git to change the ownership of the directory, according to the documentation.

Any ideas why I’m getting these filesystem errors?

Actual Result

root@localhost:~/git# gitlab-rake "gitlab:import_export:export[root, trevor, sourcetree02, /root/git/test.tar.gz]"
/opt/gitlab/embedded/lib/ruby/gems/2.7.0/gems/zeitwerk-2.6.6/lib/zeitwerk/kernel.rb:38: warning: ⛔️ WARNING: Sidekiq testing API enabled, but this is not the test environment.  Your jobs will not go to Redis.
E, [2023-03-09T19:57:08.400513 #31111] ERROR -- : Invalid file path: /root/git/test.tar.gz. Please provide correct file path
root@localhost:~/git# ls
root@localhost:~/git# gitlab-rake "gitlab:import_export:export[root, trevor, sourcetree02, /root/git/]"
/opt/gitlab/embedded/lib/ruby/gems/2.7.0/gems/zeitwerk-2.6.6/lib/zeitwerk/kernel.rb:38: warning: ⛔️ WARNING: Sidekiq testing API enabled, but this is not the test environment.  Your jobs will not go to Redis.
W, [2023-03-09T20:18:44.551178 #33661]  WARN -- : Scoped order is ignored, it's forced to be batch order.
W, [2023-03-09T20:18:45.581242 #33661]  WARN -- : Scoped order is ignored, it's forced to be batch order.
E, [2023-03-09T20:18:46.886212 #33661] ERROR -- : Permission denied @ rb_file_s_stat - [FILTERED]

Expected Result

GitLab project is exported to file.