Error on git push: "Remote "origin" does not support the LFS locking API. (...) x509: certificate signed by unknown authority"

Summary

Cannot push to GitLab through the command line:

➜  git push origin <feature-branch>
Remote "origin" does not support the LFS locking API. Consider disabling it with:
  $ git config lfs.https://gitlab.com/gitlab-com/<project>.git/info/lfs.locksverify false
Post "https://gitlab.com/gitlab-com/<project>.git/info/lfs/locks/verify": x509: certificate signed by unknown authority

Notes:

  • Yesterday I pushed to GitLab normally. The problem happened this morning (2021-01-21), out of nowhere.

  • Happened in different repos: gitlab and www.

  • I updated everything on my computer:

    • Checked for macOS updates - all up-to-date.
    • Checked for software updates (softwareupdate --all --install --force`).
    • Checked for locked files with git lfs locks and through the UI. Nothing locked.
    • Reinstalled Git LFS (git lfs install).
    • Ran brew doctor.
    • Updated xcode-select.
    • Restarted my Mac, and tried again.
    • No success.
  • I managed to fix it with a git config command outputted by the command line, but I'm not sure whether it affects Git LFS and File Locking:

    git config lfs.https://gitlab.com/gitlab-com/<project>.git/info/lfs.locksverify false

Steps to reproduce

  1. Checkout a feature branch.

  2. Make a change.

  3. Stage and commit.

  4. Push to origin git push origin <feature-branch>.

  5. GitLab responds:

    Remote "origin" does not support the LFS locking API. Consider disabling it with:
    $ git config lfs.https://gitlab.com/gitlab-com/<project>.git/info/lfs.locksverify false
    Post "https://gitlab.com/gitlab-com/<project>.git/info/lfs/locks/verify": x509: certificate signed by unknown authority
  6. Git doesn't push it.

How I fixed it:

  1. Ran git config lfs.https://gitlab.com/gitlab-com/<project>.git/info/lfs.locksverify false.
  2. Pushed again.
  3. It worked.

Example Project

What is the current bug behavior?

GitLab asks me to config repo to lfs.locksverify false.

What is the expected correct behavior?

Not ask me anything.

Relevant logs and/or screenshots

Added above

Output of checks

This bug happens on GitLab.com

Results of GitLab environment info

  • GitLab.com running GitLab Enterprise Edition 13.8.0-pre 3e1d24dad25
  • macOS Big Sur 11.1
  • Chrome Version 87.0.4280.141 (Official Build) (x86_64)
  • Git version 2.30.0
  • ZSH/iterm2

Results of GitLab application Check

Expand for output related to the GitLab application check

(For installations with omnibus-gitlab package run and paste the output of: sudo gitlab-rake gitlab:check SANITIZE=true)

(For installations from source run and paste the output of: sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production SANITIZE=true)

(we will only investigate if the tests are passing)

Possible fixes

Edited by Marcia Ramos