Seems there is an issue floating around when a user tries to push on their GitLab CentOS installation. There are two ways one can push to a git repo. Using their username:password through http and using their ssh key without the need of a password. For example:
git push https://centos.local/axil/git.git master
will prompt for the GitLab username:password
git push firstname.lastname@example.org:axil/git.git master
will push to the repo without the need of a password just using the ssh key I uploaded using the GitLab interface.
Note: Pushing via ssh usually requires that you have set up properly
.ssh/config for the user you are pushing from. Mine entry for example
Host centos.local User axil Hostname centos.local PreferredAuthentications publickey IdentityFile /home/axil/.ssh/id_rsa
If you have installed GitLab on CentOS/RHEL, you may not be able to push via ssh
and the reason is the restrictions SELinux has on
In order to fix this problem, simply run as root:
restorecron -Rv /home/git/.ssh/
You can read more here.
The above fix has already taken its way upstream in the CentOS guide at the gitlab-recipes repo. If you find any other issues you are welcome to submit them in the bug tracker.