Problem

Cannot push to repo in Gerrrit code review.

Push results in this message:
fatal: Upload denied for project '<repo>'
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.

Solution

The issue here is that with the new SAML login system, you can no longer use https with your main credentials. If you wish to continue using https to identify to the server, you need to go to your account settings on Gerrit, and under "HTTP Credentials", select "Generate New Password". This will create a password that is unique to that Gerrit server which can then be used for pushing and pulling via https.

There was no change to how SSH works, so if you are able to use SSH, switching to SSH remotes is also an option.