Trying to set up GitLab on Amazon Linux 2022, can only install old version that has problem with BCrypt hash

I’m trying to use GitLab on Amazon Linux 2022. I was able to get everything installed correctly so far as I can tell, except that I’m using version 9.5.10, and that seems to have a problem with BCrypt, which leads to error 500 when I try logging into GitLab through the web.

I tried updating GitLab with a sudo yum update. I can see that version 15.5.2 is available, but I can’t install it because nothing provides policycoreutils-python, which is needed by gitlab-ce-15.5.2-ce.0.el7.x86_64. Some googling makes it look like policycoreutils-python’s functionality has been moved into policycoreutils-python-utils and python3-policycoreutils, both of which I have.

I think the BCrypt implementation in 9.5.10 is causing these issues because when I run gitlab-ctl tail, and then try logging in or making a new user through the web, I can see this error: BCrypt::Errors::InvalidHash. Also, if I try creating a user through the Rails console, I get the same error: BCrypt::Errors::InvalidHash: invalid hash. Some googling leads me to believe this error is usually caused by incompatible software versions, so I need to update, right?

But I can’t update GitLab because it wants policycoreutils-python, which has been replaced. And that’s where I am now.

Has anyone successfully installed GitLab on Amazon Linux 2022? Were you able to update it? What do I need to do, either to update GitLab, or to use this ancient version?

OK, I was able to upgrade GitLab, by manually downloading the rpm files (following the order listed at Upgrading GitLab | GitLab) and then installing them with sudo rpm -U --nodeps gitlab-ce.version.number.rpm. It’s working fine now.

And since I didn’t see this in any of the instructions elsewhere, if your Gitlab server is exposed to the internet, then after you create a username for yourself, use gitlab-rails console to set yourself to admin = true. Then turn off creating new accounts.