sameersbn / sameersbn/docker-gitlab

API v3 Problem because wrong NGINX configuration? (Get Single Project)

Open
#703 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

wontfix
Dominant language
Shell
Stars
8.1k
Forks
2.1k
Avg merge
17h 47m
Merged PRs (30d)
7

Description

Hello,

I can't fetch project by NAMESPACE/PROJECT_NAME via APIv3 because nginx configuration is wrong.

... If using namespaced projects call make sure that the NAMESPACE/PROJECT_NAME is URL-encoded, eg. /api/v3/projects/diaspora%2Fdiaspora (where / is represented by %2F).

https://github.com/gitlabhq/gitlabhq/blob/master/doc/api/projects.md#get-single-project

The problem source is "%2F".

Solution is here:

https://github.com/gitlabhq/gitlabhq/issues/8290#issuecomment-95069665

proxy_pass http://unix:/home/git/gitlab/tmp/sockets/gitlab.socket:$request_uri;

Apache 2 (Reverse Proxy):

https://gitlab.com/gitlab-org/gitlab-recipes/commit/73abde7501b6cd128ce22ea9f82dc19fdc867c80

Test:

curl  \
    --insecure \
    --header "PRIVATE-TOKEN: **yourprivatetoken**"  \
    -XGET "https://your-gitlab-url/api/v3/projects/**yournamepace**%2F**yourproject**"

Thanks!

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the API v3 Get Single Project documentation and the referenced nginx proxy_pass configuration, especially how $request_uri handles the encoded %2F. Reproduce the request with the provided curl example, then compare the nginx and Apache reverse-proxy references; done means namespaced project requests succeed through the documented setup.

Written by the indexing model from the issue text.

Assessment

Tech stack
nginx
Domain
infrastructure
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.