Fork API optional arguments don't work as per documentation

Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.

  • Close this issue

Summary

When using Fork API (https://docs.gitlab.com/ee/api/projects.html#fork-project), the document mentions we give an optional path and name attributes that will change the resultant forked project name and path attributes. But it doesn't work.

Steps to reproduce

  1. Use POST API to fork as described
curl -X POST \
  http://yourgitlabip/api/v4/projects/94/fork \
  -H 'Content-Type: application/json' \
  -H 'PRIVATE-TOKEN: yourtoken' \
  -H 'cache-control: no-cache' \
  -d '{
	"path": "someprj",
	"name": "Some Project",
	"namespace": 18
}'
  1. Notice that having additional attributes, do not make any difference. It doesn't do anything as described in document.

What is the current bug behavior?

Not all attributes of Fork API work as per document. Original project name and path is given to the forked project.

What is the expected correct behavior?

All optional attributes of Fork API should work as per document. The forked project's name and path should be changed as per the arguments given in the API request body.

Results of GitLab environment info

Expand for output related to GitLab environment info

System information System: Ubuntu 16.04 Current User: git Using RVM: no Ruby Version: 2.5.3p105 Gem Version: 2.7.6 Bundler Version:1.16.6 Rake Version: 12.3.2 Redis Version: 3.2.12 Git Version: 2.18.1 Sidekiq Version:5.2.3 Go Version: unknown

GitLab information Version: 11.7.5 Revision: c5b5b18 Directory: /opt/gitlab/embedded/service/gitlab-rails DB Adapter: postgresql URL: http://610-ml3-xs1.megarac.local HTTP Clone URL: http://610-ml3-xs1.megarac.local/some-group/some-project.git SSH Clone URL: git@610-ml3-xs1.megarac.local:some-group/some-project.git Using LDAP: no Using Omniauth: yes Omniauth Providers:

GitLab Shell Version: 8.4.4 Repository storage paths:

  • default: /var/opt/gitlab/git-data/repositories Hooks: /opt/gitlab/embedded/service/gitlab-shell/hooks Git: /opt/gitlab/embedded/bin/git

Results of GitLab application Check

Expand for output related to the GitLab application check
Checking GitLab subtasks ...

Checking GitLab Shell ...

GitLab Shell: ... GitLab Shell version >= 8.4.4 ? ... OK (8.4.4) Running /opt/gitlab/embedded/service/gitlab-shell/bin/check Check GitLab API access: OK Redis available via internal API: OK

Access to /var/opt/gitlab/.ssh/authorized_keys: OK gitlab-shell self-check successful

Checking GitLab Shell ... Finished

Checking Gitaly ...

Gitaly: ... default ... OK

Checking Gitaly ... Finished

Checking Sidekiq ...

Sidekiq: ... Running? ... yes Number of Sidekiq processes ... 1

Checking Sidekiq ... Finished

Checking Incoming Email ...

Incoming Email: ... Reply by email is disabled in config/gitlab.yml

Checking Incoming Email ... Finished

Checking LDAP ...

LDAP: ... LDAP is disabled in config/gitlab.yml

Checking LDAP ... Finished

Checking GitLab App ...

Git configured correctly? ... yes Database config exists? ... yes All migrations up? ... yes Database contains orphaned GroupMembers? ... no GitLab config exists? ... yes GitLab config up to date? ... yes Log directory writable? ... yes Tmp directory writable? ... yes Uploads directory exists? ... yes Uploads directory has correct permissions? ... yes Uploads directory tmp has correct permissions? ... yes Init script exists? ... skipped (omnibus-gitlab has no init script) Init script up-to-date? ... skipped (omnibus-gitlab has no init script) Projects have namespace: ... 11/8 ... yes 12/10 ... yes 8/12 ... yes 11/14 ... yes 3/16 ... yes 15/20 ... yes 2/21 ... yes 17/22 ... yes 15/23 ... yes 18/24 ... yes 21/25 ... yes 31/26 ... yes 31/27 ... yes 35/28 ... yes 17/40 ... yes 39/41 ... yes 17/43 ... yes 17/45 ... yes 17/46 ... yes 17/48 ... yes 17/49 ... yes 17/50 ... yes 17/51 ... yes 17/52 ... yes 17/53 ... yes 17/54 ... yes 17/55 ... yes 17/56 ... yes 17/57 ... yes 17/60 ... yes 17/61 ... yes 17/62 ... yes 17/64 ... yes 17/66 ... yes 43/68 ... yes 17/85 ... yes 17/86 ... yes 17/87 ... yes 17/88 ... yes 17/89 ... yes 17/90 ... yes 17/91 ... yes 17/92 ... yes 31/94 ... yes 17/95 ... yes 17/96 ... yes 17/99 ... yes 17/100 ... yes 17/101 ... yes 17/102 ... yes 17/105 ... yes 17/106 ... yes 17/107 ... yes 17/108 ... yes 17/109 ... yes 17/110 ... yes 17/111 ... yes 17/112 ... yes 17/113 ... yes 17/114 ... yes 17/115 ... yes 17/116 ... yes 17/117 ... yes 17/118 ... yes 17/119 ... yes 17/120 ... yes 17/121 ... yes 17/122 ... yes 17/125 ... yes 17/126 ... yes 17/127 ... yes 17/128 ... yes 17/129 ... yes 17/130 ... yes 17/131 ... yes 17/132 ... yes 17/133 ... yes 17/134 ... yes 17/135 ... yes 17/136 ... yes 17/137 ... yes 17/138 ... yes 17/139 ... yes 17/140 ... yes 17/141 ... yes 17/142 ... yes 17/143 ... yes 17/144 ... yes 17/145 ... yes 17/146 ... yes 17/147 ... yes 17/148 ... yes 17/149 ... yes 17/150 ... yes 17/151 ... yes 17/152 ... yes 17/153 ... yes 17/154 ... yes 17/157 ... yes 17/158 ... yes 18/159 ... yes Redis version >= 2.8.0? ... yes Ruby version >= 2.3.5 ? ... yes (2.5.3) Git version >= 2.18.0 ? ... yes (2.18.1) Git user has default SSH configuration? ... yes Active users: ... 14

Checking GitLab App ... Finished

Checking GitLab subtasks ... Finished

Edited Jun 29, 2025 by 🤖 GitLab Bot 🤖
Assignee Loading
Time tracking Loading