URL returns 500 when running job

Every time I run a job I get the following error:
fatal: unable to access ‘https://gitlab-ci-token:[MASKED]@gitlab.domain.com/group/subgroup/project.git/’: The requested URL returned error: 500

I’ve looked at all the possible solutions I could find, but none of them have worked.

I’m running the Community Edition (self-hosted).

Hi @Tau

“/etc/gitlab-runner/config.toml” on *nix systems when gitlab-runner is executed as root (this is also path for service configuration)
if GitLab instance is exposed to an URL which can’t be used by the runner, a clone_url can be configured

You may need to configure the “clone_url = “http://<gitalab_IP>”” in the gitlab-runner “/etc/gitlab-runner/config.toml” file.

For Example :

  name = "ruby-2.1-docker"
  url = "https://CI/"
  token = "TOKEN"
  limit = 0
  executor = "docker"
  builds_dir = ""
  shell = ""
  environment = ["ENV=value", "LC_ALL=en_US.UTF-8"]
  clone_url = "http://gitlab.example.local"


Thanks Kiran!

Unfortunately this did not solve the issue and I still get that error message.

CI has been working fine up until now, and there haven’t been any notable changes to GitLab’s configuration between then and now, so I’m not sure why it’s doing this.

Here’s the actual log entry:

Started GET “/group/subgroup/project.git/info/refs?service=git-upload-pack” for at 2019-07-25 14:19:29 -0400
Processing by Projects::GitHttpController#info_refs as /
Parameters: {“service”=>“git-upload-pack”, “namespace_id”=>“group/subgroup”, “project_id”=>“project.git”}
Completed 500 Internal Server Error in 60ms (ActiveRecord: 14.8ms | Elasticsearch: 0.0ms)

JWT::DecodeError (Nil JSON web token):

Solved. For some reason the subgroup that the project was in couldn’t be accessed via URL, so I just moved it and it works.

Hi @Tau,

Can you please share the details how you resolve this issue?

So That means “clone_url” option in “config.toml” is not worked :anguished:

I moved the project out of the subgroup and into its parent group and it works now.

I have no idea why projects in a sub-group have this 500 error on their URL, it may be a bug.