500 error when setting SSH keys

I have set up Gitlab on my local server. When I am trying to add my local system’s SSH key in my Gitlab account, I am getting 500 error. How can I resolve this?

Have you checked your log files? gitlab-ctl tail. Having recently resolved a 500 error myself and in the past other problems the log files are the first place to start. In particular if you are on Linux I would look at /var/log/gitlab/gitlab-rails/production.log What do you see in there?