We can not pull and push in Gitlab. On cloning using ssh, the git creates a directory, then fails to authenticate the user. It keeps prompting for the password.
Below is the error message:
"Permission denied (publickey,password).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists."
We tried to recreate the SSH key using the command " sudo -u git -H bundle exec rake gitlab:shell:setup RAILS_ENV=production" which also gives syntax error.
"[!] There was an error parsing Gemfile: compile error - syntax error, unexpected ‘:’, expecting $end
gem “mysql2”, group: :mysql
^. Bundler cannot continue.
Gitlab uses an alternative location for the authorized_keys file (/var/opt/gitlab/.ssh/authorized_keys), make sure that that is included (at least for the git user) in your sshd config.
Thanks for your suggestion, Bartj.
The Gitlab we are using very old version 7+ and installed through source so the SSH key location is /home/git/.ssh/authorized_keys.
We tried to upgrade Gitlab to the latest version but it was not successful so had to restore Gitlab from the backup, the SSH keys are not working after restored. Any idea?