How to push to server from gitlab

Hello.

OK, what i really need to do is this:

When i push anything from my local machine to gitlab, gitlab push automatically to my remote server.

I tried to do it from
my-project -> Settings -> Push to a remote repository
But no luck though.
Ii want to add ssh for the repo but there is a required authorization for my remote server as i get the following error:
The remote repository failed to update X minutes ago.
Host key verification failed.
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

@hassanzohdy - you’ll need to:

  • copy the key from the gitlab host (/var/opt/gitlab/.ssh/id_rsa.pub) to the remote host
  • Set the ssh-based URL like ssh://git@remote.git.host/home/git/repos/myrepo.git - the full path is necessary, or you can use ~ to indicate the home-path: ssh://git@remote.git.host/~/repos/myrepo.git.

But I’m on the shared gitlab.com server - I can’t reach this file.