Search code examples
gitgitlabgit-pushmingw-w64git-remote

! [remote rejected] main -> main (pre-receive hook declined)


We recently migrated the gitlab server, the structure is working without problems via the web browser.

However, when I try to push git push origin main I return the following error:

lucas_a@NB04 MINGW64 /c/temp/git/aulagitlab (main) $ git push origin main Enumerating objects: 3, done. Counting objects: 100% (3/3), done. Delta compression using up to 8 threads Compressing objects: 100% (2/2), done. Writing objects: 100% (2/2), 224 bytes | 74.00 KiB/s, done. Total 2 (delta 1), reused 0 (delta 0), pack-reused 0 remote: GitLab: 401 Unauthorized To gitlab.domain.com.br:tecnica/aulagitlab.git ! [remote rejected] main -> main (pre-receive hook declined) error: failed to push some refs to 'gitlab.domain.com.br:tecnica/aulagitlab.git'

Can you help me, please?

I have already checked the permissions, and disabled Git Large File Storage (LFS)


Solution

  • It's buried in that message, but the problem here is 401 Unauthorized To gitlab.domain.com.br:tecnica/aulagitlab.git - either you didn't provide credentials, or the credentials you provided aren't recognized. Did anything change as far as passwords or tokens?