Skip to content

git source not updated with error message fatal: remote origin already exists.

Summary

After upgrading 11.8 to 11.9 runner we've encountered fatal: remote origin already exists. error message. This wasn't failing the job but was preventing the pull of the latest code therefore the job was running against the last state before the runner upgrade.

Steps to reproduce

windows server 2019, with gitlab-runner 11.9 windows server 2012 with gitlab-runner 11.9

check_interval = 0

[session_server]
  session_timeout = 1800

[[runners]]
  name = "CANGITRUN02"
  url = "https://git.company.com"
  token = "xxxxx"
  executor = "shell"
  environment = ["GIT_SSL_NO_VERIFY=true"]
  [runners.cache]
    [runners.cache.s3]
    [runners.cache.gcs]

Actual behavior

fresh install

on CANGITRUN02 UAViE9xR
Using Shell executor...
Running on CANGITRUN02...
Reinitialized existing Git repository in C:/gitlab-runner/builds/UAViE9xR/0/some-client/.git/
Fetching changes...
fatal: remote origin already exists.
$ dir
 Volume in drive C has no label.
 Volume Serial Number is F035-436C

 Directory of C:\gitlab-runner\builds\UAViE9xR\0\some-client

2019-03-27  02:43 PM    <DIR>          .
2019-03-27  02:43 PM    <DIR>          ..
               0 File(s)              0 bytes
               2 Dir(s)  37,447,536,640 bytes free

change are not fetched on existing install

  on CANGITRUN01 7g9payYw
Using Shell executor...
Running on CANGITRUN01...
Reinitialized existing Git repository in C:/gitlab-runner/builds/7g9payYw/0/some-client/.git/
Fetching changes...
fatal: remote origin already exists.

Expected behavior

runner should be able to checkout the code.

Environment description

gitlab self-hosted CE 11.9.0 GitLab 11.9.0 (a47124c) GitLab Shell 8.7.1 GitLab Workhorse v8.3.1 GitLab API v4 Ruby 2.5.3p105 Rails 5.0.7.1 postgresql 9.6.11