Unable to push to my repository: The requested URL returned error: 418

I encountered this error when pushing my code to my forked repository:

Bin@DESKTOP-BIN MINGW64 /e/workspace/c/libxml2 (master)
$ git push
fatal: unable to access 'https://gitlab.gnome.org/he7850/libxml2.git/': The requested URL returned error: 418

I have tried:

  1. adding public key to account
  2. using proxy

but still get same error message.

Anyone knows how to solve this issue? thanks

1 Like

Shouldn’t the URL in your config be just https://gitlab.gnome.org/he7850/libxml2.git - no \ at the end?

yeah, this is strange, but I just used git clone https://gitlab.gnome.org/he7850/libxml2.git to clone the code, and git remote show looks normal.

The code snippet above doesn’t show it, but are you being prompted for a username and password? And are you logging into GitLab with a GitLab account, or with something else (e.g. GitHub)?