How to push to server from gitlab


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/ to the remote host
  • Set the ssh-based URL like ssh:// - the full path is necessary, or you can use ~ to indicate the home-path: ssh://

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