Cannot import project using create project API with import_url parameter

:hugs: Please help fill in this template with all the details to help others help you more efficiently. Use formatting blocks for code, config, logs and ensure to remove sensitive data.

Problem to solve

Describe your question in as much detail as possible:

  • I got Forbidden response when I used create project API with import_url parameter to import public repository.
  • curl command is like this below.
curl --request POST --header "PRIVATE-TOKEN: token" \
     --header "Content-Type: application/json" --data '{
        "name": "fuga", "description": "New Project", "path": "admin-stg", "import_url": "repo_url"}' \
     --url "http://self_host_domain/api/v4/projects/"
  • I confirmed Access Token is collect because it worked when I tried create project API without import_url.

Steps to reproduce

  • I checked the token permission, and it has full access. But somehow I got forbidden response.
  • It is public repository.

Configuration

Provide screenshots from the GitLab UI showing relevant configuration, if applicable.
On self-managed instances, add the relevant configuration settings or changes.

Versions

Please select whether options apply, and add the version information.

Versions

Helpful resources

  1. Projects API | GitLab

Could anyone tell me how to fix this?