Commit 6f18b556 authored by Harsh Chouraria's avatar Harsh Chouraria Committed by Nick Gaskill

Group access tokens cannot import projects

Import process always attempts at adding the importing user as a
direct member to the target project or group. This does not work
when the importing user is a group (or project) access token bot
account because of restrictions that prevent such a user from being
a direct member of any group other than the top level one.

This change adds a troubleshooting entry with the error
that is observed when a group access token is used to attempt
a project import.
parent 04d964f5
......@@ -383,3 +383,17 @@ s = Gitlab::ImportExport::Saver.new(exportable: p, shared:p.import_export_shared
s.send(:compress_and_save)
s.send(:save_upload)
```
### Import using the REST API fails when using a group access token
[Group access tokens](../../group/settings/group_access_tokens.md)
don't work for project or group import operations. When a group access token initiates an import,
the import fails with this message:
```plaintext
Error adding importer user to Project members.
Validation failed: User project bots cannot be added to other groups / projects
```
To use [Import REST APIs](../../../api/project_import_export.md),
pass regular user account credentials such as [personal access tokens](../../profile/personal_access_tokens.md).
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment